在 Ruby 安装期间遇到 RVM 问题 (1.9.2)

发布于 2024-12-08 04:50:38 字数 1588 浏览 4 评论 0原文

我正在尝试通过 RVM 安装 ruby​​,但收到以下错误,并且日志不太清楚发生了什么,有人遇到过这种情况吗?我似乎记得 Ruby 不应该以 root 身份安装,但我对收到的权限错误有点怀疑。

**Installing Ruby from source to: /Users/mark/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...
ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #downloading ruby-1.9.2-p290, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file ruby-1.9.2-p290.tar.bz2: Permission denied
  0 8604k    0 16150    0     0  14980      0  0:09:48  0:00:01  0:09:47 26562
curl: (23) Failed writing body (0 != 16150)
ERROR: There was an error, please check /Users/mark/.rvm/log/ruby-1.9.2-p290/*.log. Next we'll try to fetch via http.
Trying http:// URL instead.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file ruby-1.9.2-p290.tar.bz2: Permission denied
  0 8604k    0 16150    0     0  24640      0  0:05:57 --:--:--  0:05:57 28333
curl: (23) Failed writing body (0 != 16150)
ERROR: There has been an error while trying to fetch the source.  
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.**

I'm trying to install ruby via RVM and am getting the following error and the logs are not really clear as to what's going on, has anyone run into this? I seem to recall that Ruby should not be installed as root but I'm a bit suspicious of the permissions error that I'm getting.

**Installing Ruby from source to: /Users/mark/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...
ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #downloading ruby-1.9.2-p290, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file ruby-1.9.2-p290.tar.bz2: Permission denied
  0 8604k    0 16150    0     0  14980      0  0:09:48  0:00:01  0:09:47 26562
curl: (23) Failed writing body (0 != 16150)
ERROR: There was an error, please check /Users/mark/.rvm/log/ruby-1.9.2-p290/*.log. Next we'll try to fetch via http.
Trying http:// URL instead.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file ruby-1.9.2-p290.tar.bz2: Permission denied
  0 8604k    0 16150    0     0  24640      0  0:05:57 --:--:--  0:05:57 28333
curl: (23) Failed writing body (0 != 16150)
ERROR: There has been an error while trying to fetch the source.  
Halting the installation.
ERROR: There has been an error fetching the ruby interpreter. Halting the installation.**

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

段念尘 2024-12-15 04:50:38

我有同样的错误消息,我通过执行 sudo chown -R user:user /usr/local/rvm 解决了它,其中 user 是您的登录用户,之后我运行了 rvm install 1.9.2 并成功完成。

I had the same error message, and i resolved it by doing sudo chown -R user:user /usr/local/rvm where user is your logged in user, after that i ran rvm install 1.9.2 and it completed successfully.

秉烛思 2024-12-15 04:50:38

我喜欢上面的解决方案,但不使用 user:user 而是使用 user:rvm。

I like the solution above but instead of using user:user do user:rvm.

淡看悲欢离合 2024-12-15 04:50:38

确保您已将用户添加到 rvm 组。另外,请确保您注销并登录。组成员身份是在登录时处理的,因此为了写入 /usr/local/rvm,您必须注销然后登录,以便操作系统识别您所在的组。 rvm组。

Make sure you've added your user to the rvm group. Also, make sure you log out and log in. Group memberships are processed at login, so in order to write to /usr/local/rvm, you must log out and then log in so that the OS recognizes that you're in the rvm group.

单身情人 2024-12-15 04:50:38

错误似乎是

Failed to create the file ruby-1.9.2-p290.tar.bz2: Permission denied

您是否尝试使用 sudo 做某事一次?您需要确保您的用户可写入 /Users/mark/.rvm/rubies/

The error seems to be

Failed to create the file ruby-1.9.2-p290.tar.bz2: Permission denied

Did you try to do something with sudo one time? You want to make sure that /Users/mark/.rvm/rubies/ is writable for your user.

铜锣湾横着走 2024-12-15 04:50:38

对于现在加入的开发人员,如果您使用多模式 rvm 安装,请记住将当前用户添加到 rvm 组,如下所示

rvm group add rvm $USER

For the Devs coming in now, if you are using multi-mode rvm install, remember to add the current user to rvm group like so

rvm group add rvm $USER

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文