我从我的管理员账户安装了Homebrew。如果我从该账户运行brew doctor
,则不会出现错误,但是如果我从非管理员用户账户运行brew doctor
,则会收到关于多个目录(usr/local
及其子目录)不可写的警告,并建议我使用chown
更改它们。
最近,我从非管理员账户安装了RVM(以确保该用户能够使用它并在其主目录中安装)。然后我以非管理员身份运行rvm install 1.9.3
,并收到一个错误提示,告诉我usr/local/bin
不可写,并且Homebrew需要它。运行rvm requirements
也会出现相同的警告。
我应该以非管理员身份安装RVM,然后在安装带有RVM的Ruby版本时切换到管理员身份,然后能够在非管理员账户中使用RVM(除了安装之外的其他操作)吗?还是说这里有别的问题?
当我尝试安装1.9.3时,RVM输出如下:
$ rvm install 1.9.3
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p448.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
ERROR: '/usr/local/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
Requirements installation failed with status: 1.
有人建议我在管理员身份下安装Homebrew不太妥当,所以我应该以管理员身份卸载Homebrew,然后作为普通用户重新安装。我尝试过这样做,但当我以普通用户身份运行安装脚本时,它首先告诉我:
$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
This script requires the user myuser to be an Administrator. If this
sucks for you then you can install Homebrew in your home directory or however
you please; please refer to our homepage. If you still want to use this script
set your user to be an Administrator in System Preferences or `su' to a
non-root user with Administrator privileges.
我想这就是我最初将其作为管理员安装的原因。有助于澄清吗?