【发布时间】:2015-03-30 10:51:27
【问题描述】:
我最近安装了 Homebrew 和 RVM。但是,当我尝试将新版本的 Ruby 安装到 RVM 中时:...
rvm 安装 2.2
我收到以下错误:
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/osx/10.9/x86_64/ruby-2.2.0.tar.bz2
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.
所以我运行了医生命令查看错误并看到:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: /usr/local/bin isn't writable.
This can happen if you "sudo make install" software that isn't managed by
by Homebrew. If a formula tries to write a file to this directory, the
install will fail during the link step.
我在其他各种目录中发现了同样的问题:
/Library/Caches/Homebrew
/usr/local/Cellar
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/lib/pkgconfig
/usr/local/opt
/usr/local/share
/usr/local/share/man
/usr/local
当我安装 RVM 时,我将单个用户安装到非管理员帐户中。我将使用这个非管理员帐户作为我的开发帐户。这可以吗,还是我应该使用管理员帐户进行开发?我遇到了各种权限类型问题;例如,由于写入权限失败而尝试安装 gem,现在我质疑开发代码的正确方法是什么,而不是管理员,还是我应该是管理员?
我打算开始使用 chown 来修复这些错误,即
chown $USER -R /usr/local/bin
但是,这让我很担心。我想将所有这些系统目录的所有者更改为我的非管理员帐户吗?在我继续之前真的想要一些重新保证,它只是感觉,错了。 (PS;chown 的用法正确吗?)
我看过其他建议使用 sudo 的文章,但我也看过一些文章说你不应该使用 sudo。谨慎起见,我宁愿不使用 sudo。
谢谢。
【问题讨论】: