[英]sudo: rvm: command not found - RVM MultiUser install on Ubuntu 12.04 server
I'm setting up a server, it's an Ubuntu 12.04 我正在建立一个服务器,它是一个Ubuntu 12.04
first I installed RVM multi-user: 首先我安装了RVM多用户:
me@ubuntu$ \\curl -L https://get.rvm.io | sudo bash -s stable
then after RVM installed, as the installation suggests I added myself to RVM group 然后在安装RVM之后,安装建议我将自己添加到RVM组
usermod -a -G me rvm
installed ruby rvm insall 1.9.3 --default
安装ruby
rvm insall 1.9.3 --default
then I tried to install system wide gem passenger and I get this: 然后我尝试安装系统范围的宝石乘客,我得到这个:
me@ubuntu:~$ rvmsudo gem install passenger
sudo: gem: command not found
In fact any command run with rvmsudo
just says sudo : {command}: not found
事实上,任何使用
rvmsudo
运行的命令都只是说sudo : {command}: not found
I need gems to be installed system wide, because it's a production server setup, also installing passenger-install-nginx-module
requires root permissions as it installs int to /opt/nginx/
我需要在系统范围内安装gem,因为它是一个生产服务器设置,同时安装
passenger-install-nginx-module
需要root权限,因为它将int安装到/opt/nginx/
any thoughts? 有什么想法吗?
Maybe this bug affects you. 也许这个 bug会影响你。
Instead of waiting for a fixed release you might install an older version of rvm: 您可以安装旧版本的rvm,而不是等待固定版本:
\curl -L https://get.rvm.io | sudo bash -s -- --version 1.16.20
See https://rvm.io/rvm/install/ for details. 有关详细信息,请参阅https://rvm.io/rvm/install/ 。
EDIT: This issue is now solved. 编辑:这个问题现在解决了。
rvmsudo
is working for me (Ubuntu 12.04). rvmsudo
正在为我工作(Ubuntu 12.04)。
I was having this same problem today too, and instead of waiting for the fix or installing an older version of rvm, I patched my rvmsudo file back to 1.16.x and left the rest of rvm alone. 我今天也遇到了同样的问题,而不是等待修复或安装旧版本的rvm,我将我的rvmsudo文件修补回1.16.x并将其余的rvm单独留下。
first double check where rvmsudo is located on your system: 首先仔细检查rvmsudo在您系统上的位置:
> which rvmsudo
/usr/local/rvm/bin/rvmsudo
then replace it with the version from 1.16.x 然后将其替换为1.16.x版本
curl https://raw.github.com/wayneeseguin/rvm/eef67d80409ee3291de83ec4f070bed5aaca6d41/binscripts/rvmsudo > /path/to/rvmsudo
Note: I actually tried first updating to the latest version of rvm, since the issue that @trobter links to above in rvm's github account is marked as fixed, but the fix doesn't fully resolve the issue, so then I searched through their github account for the version of rvmsudo from 1.16.x, which did work. 注意:我实际上尝试首先更新到最新版本的rvm,因为@trobter链接到rvm的github帐户上面的问题被标记为已修复,但修复程序没有完全解决问题,所以我搜索了他们的github从1.16.x开始考虑rvmsudo的版本,它确实有效。
I think it may be because you did not add yourself to the rvm group. 我想这可能是因为你没有把自己添加到rvm组。 You said:
你说:
usermod -a -G me rvm
What it should be is: 它应该是:
usermod -a -G rvm me
In addition, I needed to add the following line to the end of my .bashrc
: 另外,我需要在
.bashrc
的末尾添加以下行:
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm" # This loads RVM into a shell session.
After that, just log into your shell again. 之后,再次登录您的shell。
给rvmsudo你的gem命令的完整路径?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.