在 Homebrew 中安装错误 [英] Installing in Homebrew errors
问题描述
正在尝试安装 rvm 和 ruby 1.9.2
Attempting to install rvm and ruby 1.9.2
我已经安装了 homebrew 和 git,但无法获得完整的更新,因为我不断收到权限错误.重新安装了雪豹并修复了权限.
I already installed homebrew and git, but couldn't get complete updates because I kept getting permission errors. Re-installed Snow Leopard and repaired permissions.
现在发生了......
Now this happens...
$ brew install wget
$ brew install wget
错误:无法写入/usr/local/Cellar
Error: Cannot write to /usr/local/Cellar
推荐答案
sudo chown -R $USER/usr/local
您必须使用该行赋予自己 /usr/local/
的所有权.在使用官方文档顶部的 ruby one-liner 安装 Homebrew 后,我不得不自己这样做.对我来说就像一种魅力.这应该是您唯一一次需要sudo
使用 Homebrew.
You'll have to give yourself ownership of /usr/local/
using that line right there. I had to do this myself after using the ruby one-liner at the top of the official docs to install Homebrew. Worked like a charm for me. It ought to be the only time you'll ever need to sudo
with Homebrew.
我不确定 ruby one-liner 是否能做到这一点.如果是这样,那么我系统上的其他东西就控制了 /usr/local
.
I'm not sure if the ruby one-liner does this. If it did, then something else on my system took control of /usr/local
since.
编辑:我完全错过了这个,但是@samvermette没有(见回复对我的回答):如果您在上面运行此命令并通过自制软件安装了一些需要特殊用户权限的东西,例如 mysql
,请确保将这些权限归还(因为上述命令为所有内容提供递归所有权在 /usr/local
给你($USER
).在 mysql 的情况下,它是......
Edit: I completely missed this, but @samvermette didn't (see replies to my answer): if you run this command above and have something installed via homebrew that requires special user permissions, like mysql
, make sure to give those permissions back (as the above command gives recursive ownership to everything inside /usr/local
to you ($USER
). In the case of mysql, it's…
sudo chown -RL mysql:mysql/usr/local/mysql/data
这篇关于在 Homebrew 中安装错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!