在系统范围内安装 Rubies RVM 1.5.2 安装问题
遵循安装 RVM 1.5.2 的建议,我使用这些命令来安装 RVM 1.5 .2 系统范围(进入 /usr/local/rvm):
curl http://rvm.beginrescueend.com/releases/rvm-install-head > rvm-install-head
sudo bash rvm-install-head
这本身就有效。我在 .bashrc 文件中添加了适当的源语句:
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
并继续尝试使用此命令安装 Ruby 1.9.2:
sudo rvm install 1.9.2-head
但是,我收到“rvm:未找到命令”。如果我在没有 sudo 的情况下尝试它,我就没有适当的权限来创建必要的目录等,正如预期的那样。问题似乎是为我的用户定义了shell函数rvm,但是当运行sudo时,它似乎不可用。
我的问题:在系统范围的 RVM 1.5.2 安装中安装 rubies 的正确方法是什么?
我运行的是 Ubuntu 10.04。
Following this advice for installing RVM 1.5.2, I used these commands to install RVM 1.5.2 system wide (into /usr/local/rvm):
curl http://rvm.beginrescueend.com/releases/rvm-install-head > rvm-install-head
sudo bash rvm-install-head
That, in itself, worked. I added the appropriate source statements in my .bashrc file:
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
and proceeded to attempt to install Ruby 1.9.2 with this command:
sudo rvm install 1.9.2-head
However, I get "rvm: command not found". If I try it without sudo, I don't have appropriate permissions to create the necessary directories and so forth, as would be expected. The problem seems to be that the shell function rvm is defined for my user, but when running sudo, it doesn't seem to be available.
My question: What is the correct way to install rubies in a system wide RVM 1.5.2 install?
I'm running Ubuntu 10.04.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您现有的配置脚本依赖于旧的系统范围安装脚本,那么保留 RVM 版本 1.3.0 是另一个值得考虑的选择。
(请参阅 RVM 系统范围内的安装脚本 URL 已损坏 --什么是替换?)
If you have existing provisioning scripts that depend on the old system-wide install script, then staying at RVM version 1.3.0 is another option to consider.
(See RVM system-wide install script url broken -- what is replacement?)
看来安装脚本已更新以纠正此问题,因此它似乎不再是问题。
It appears that the install scripts have been updated to correct this, so it doesn't appear to be an issue anymore.