我需要安装比 1.8.7 更新的 Ruby 版本。
我已经设法安装了 Homebrew 和 RVM,但是当我尝试安装 Ruby 时发生了这种情况。
aldaman:~ Alex$ rvm install 1.9.3
mkdir: /usr/local/rvm/log/ruby-1.9.3-p429: Permission denied
mkdir: /usr/local/rvm/log/ruby-1.9.3-p429: Permission denied
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p429.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Already up-to-date.
mkdir: /usr/local/rvm/log/ruby-1.9.3-p429: Permission denied
tee: /usr/local/rvm/log/ruby-1.9.3-p429/1370998530_package_install_openssl.log: No such file or directory
tee: /usr/local/rvm/log/ruby-1.9.3-p429/1370998530_package_install_openssl.log: No such file or directory
Installing required packages: openssl.............................
Error running 'requirements_osx_brew_libs_install openssl',
please read /usr/local/rvm/log/ruby-1.9.3-p429/1370998530_package_install_openssl.log
我不知道该如何修复它。有人知道该怎么做吗?
答案1
尝试运行sudo
:
sudo rvm install 1.9.3
答案2
看来您是在“多用户”模式(又称“系统范围安装”)下安装了 rvm。
您应该按照说明将您的用户添加到“rvm”组并重新打开会话。完成后,您将能够直接安装任何 rubyrvmsudo rvm install 1.9.3
我们通常应该谨慎使用 root 帐户或 sudo 调用。正如 rvm 安装指南中所述,没有使用大小写的情况,sudo
只有大小写的情况rvmsudo
。