自制许可权限一团糟 [英] Homebrew Permissions mess
问题描述
我从管理员帐户安装了Homebrew.如果我从该帐户运行brew doctor
,则不会出错,但是如果我从非管理员用户帐户运行brew doctor
,则会收到有关多个目录(usr/local
及其子目录)不可写的警告,并提出以下建议我chown
他们.
I installed Homebrew from my admin account. If I run brew doctor
from that account I get no errors, but if I run brew doctor
from my non-admin user account, I get warnings about several directories (usr/local
and its subdirectories) not being writable, and suggestions that I chown
them.
最近,我从非管理员帐户安装了RVM(以确保该用户可以使用它并安装在其主目录中).然后,我再次运行rvm install 1.9.3
(再次以非管理员身份),并收到一条错误消息,警告我usr/local/bin
不可写,并且对于Homebrew是必需的.运行rvm requirements
会产生相同的警告.
More recently, I installed RVM from my non-admin account (to ensure it was usable to that user and installed in their home directory). I then ran rvm install 1.9.3
(again, as non-admin) and got an error warning me that usr/local/bin
isn't writable and is required for Homebrew. Running rvm requirements
yields the same warning.
我应该以非管理员身份安装RVM,在安装带有 的ruby版本的Rem时切换到admin,然后可以从非管理员帐户?还是这里有其他问题?
Am I supposed to install RVM as non-admin, switch to admin when I install ruby version with RVM, and then be able to use RVM (for everything other than installing) from the non-admin account? Or is something else wrong here?
当我尝试安装1.9.3时,RVM输出如下:
The RVM output when I attempted to install 1.9.3 follows:
$ 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,所以我应该先卸载(以管理员身份),然后以普通用户身份重新安装.我试过了,但是当我以普通用户身份运行安装脚本时,它告诉我的第一件事是:
It's been suggested to me that I shouldn't have installed Homebrew while logged in as an admin, so I should uninstall (as admin), then reinstall as a regular user. I tried this, but when I run the install script as a regular user, the first thing it tells me is:
$ 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.
我想这就是为什么我首先以管理员身份安装它的原因.有任何帮助澄清这一点吗?
I imagine this is why I installed it as an admin in the first place. Any help clarifying this?
推荐答案
我遇到了同样的问题,我不得不阅读文档并想了很多.
I had the same problem, I had to read the doc and think a lot.
$ rvm autolibs read-only # read more here: https://rvm.io/rvm/autolibs
$ rvm install ruby # or any version you want
这告诉rvm使用当前安装的libs安装ruby ...默认为read-fail,它会因缺少需求而终止rvm.
This tells rvm to install ruby with current installed libs... default is read-fail which terminate rvm for missed requirements.
要使用openssl(gem需要它,我必须重建ruby).询问计算机管理员用brew安装openssl
To use openssl (gem needs it, I had to rebuild ruby). Ask the computer admin install openssl with brew
$ brew install openssl # if you want to install all dependencies run 'rvm requirements'
$ rvm reinstall ruby
or
$ rvm install ruby
这篇关于自制许可权限一团糟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!