简体   繁体   English

rvm install 1.9.2权限被拒绝

[英]rvm install 1.9.2 Permission denied

Installing RVM on Ubuntu 11.04. 在Ubuntu 11.04上安装RVM。

Followed the instructions here: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you 请按照此处的说明进行操作: http : //ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you

When it comes time to install Ruby, I get a permission denied exception. 到了安装Ruby的时间时,我收到一个权限被拒绝的异常。

kevinwmerritt@ubuntu:~$ rvm install 1.8.7
bash: /home/kevinwmerritt/.rvm/scripts/manage: Permission denied

The .rvm folder appears in my home directory and the bash scripts initialize rvm successfully. .rvm文件夹出现在我的主目录中,并且bash脚本成功初始化了rvm。

Using sudo yields the following: 使用sudo会产生以下结果:

sudo rvm install 1.8.7
sudo: rvm: command not found

I am new to Ubuntu. 我是Ubuntu新手。

If you did a single-user install of RVM do not use: 如果您是单用户安装的RVM,请不要使用:

sudo rvm install 1.8.7

RVM creates its own sandbox in ~/.rvm which does not need root privileges ever. RVM在~/.rvm创建自己的沙箱,该沙箱永远不需要root特权。 At NO time do you need to use sudo before rvm . 在任何时候都不需要在rvm之前使用sudo sudo will only screw up everything. sudo只会破坏一切。

Use an unadorned rvm install 1.8.7 or rvm install 1.9.2 or any other version of Ruby known to RVM. 使用未经rvm install 1.8.7rvm install 1.9.2或RVM已知的任何其他版本的Ruby。 You can see the list it knows about using rvm list . 您可以看到有关使用rvm list

I am running into the same exact problem. 我遇到了同样的问题。 I compared it against another installation of rvm on a different box that is working and noticed the permission for "manage" is different. 我将它与正在运行的另一个盒子上的另一个rvm安装进行了比较,发现“管理”权限不同。

The box that is working: 正在运行的盒子:

-rwxr-xr-x  1 deployer deployer 59002 2011-05-19 22:56 manage

The box that is not working: 无法使用的盒子:

-rw-r--r--  1 deployer deployer 59076 2011-05-22 22:12 manage

I did a chmod 755 manage and that seems to have fixed it. 我做了一个chmod 755 manage ,似乎已修复它。 I installed rvm the same way on both boxes, not sure why there's a difference. 我在两个盒子上都以同样的方式安装了rvm,不确定为什么会有区别。

You can try chmod 755 /home/kevinwmerritt/.rvm/scripts/manage and see if that resolves it 您可以尝试chmod 755 /home/kevinwmerritt/.rvm/scripts/manage ,看看是否可以解决它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM