gpt4 book ai didi

ruby-on-rails - 安装 ruby​​ rvm 时出错

转载 作者:行者123 更新时间:2023-12-01 23:20:56 28 4
gpt4 key购买 nike

关于installing Ruby1.9.3 with RVM rvm install 1.9.3,它显示以下消息。

The program 'rvm' is currently not installed.  You can install it by typing:
sudo apt-get install ruby-rvm

之后我尝试安装 ruby​​-rvm 但最后显示以下消息。

...
Setting up libreadline-gplv2-dev (5.2-11) ...
Setting up ruby-rvm (1.6.9-0ubuntu2) ...
dpkg-statoverride: error: syntax error: unknown group 'admin' in statoverride file
dpkg: error processing ruby-rvm (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
ruby-rvm
E: Sub-process /usr/bin/dpkg returned an error code (1)

收到这条消息后我抬头看here但我无法弄清楚上面的错误代码意味着什么。

virus@virus-pc:~$ source /usr/local/rvm/scripts/rvm

virus@virus-pc:~$ type rvm | head -1
rvm is a function

virus@virus-pc:~$ rvm use 1.9.3 --default
ruby-1.9.3-p194 is not installed.
To install do: 'rvm install ruby-1.9.3-p194'

virus@virus-pc:~$ rvm install ruby-1.9.3-p194
ruby-1.9.3-p194 - #configure
ruby-1.9.3-p194 - #download
Archive checksum did not match, downloading again.
rm: cannot remove `bin-ruby-1.9.3-p194.tar.bz2': Permission denied
curl: Can't open 'bin-ruby-1.9.3-p194.tar.bz2'!
curl: try 'curl --help' or 'curl --manual' for more information
There was an error(23), please check /usr/local/rvm/log//*.log. Next we'll try to fetch via http.
Trying ftp:// URL instead.
curl: Can't open 'bin-ruby-1.9.3-p194.tar.bz2'!
curl: try 'curl --help' or 'curl --manual' for more information
There was an error(23), please check /usr/local/rvm/log//*.log
Downloading https://rvm.io/binaries/ubuntu/12.04/x86_64/ruby-1.9.3-p194.tar.bz2 failed.
Mounting remote ruby failed, trying to compile.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p194, this may take a while depending on your cpu(s)...
ruby-1.9.3-p194 - #downloading ruby-1.9.3-p194, this may take a while depending on your connection...
mkdir: cannot create directory `/usr/local/rvm/log/ruby-1.9.3-p194': Permission denied
tee: /usr/local/rvm/log/ruby-1.9.3-p194/fetch.log: No such file or directory
bash: /usr/local/rvm/log/ruby-1.9.3-p194/fetch.log: No such file or directory
Error running '/usr/local/rvm/scripts/fetch http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.bz2', please read /usr/local/rvm/log/ruby-1.9.3-p194/fetch.log
There has been an error fetching the ruby interpreter. Halting the installation.
bash: /usr/local/rvm/user/installs.new: Permission denied
mv: cannot stat `/usr/local/rvm/user/installs.new': No such file or directory
bash: /usr/local/rvm/user/installs: Permission denied

我曾尝试安装它并浪费了 3 天的时间,但无法成功在 Rails 上安装 ruby​​ 并解决上述错误。由于我是 ruby​​ 的新手,因此感谢任何帮助。

环境:Ubuntu-12.04 64位

最佳答案

您正在尝试使用 apt-get 安装它。您可能安装了 ruby​​-rvm,但由于它已经过时,所以安装时已损坏。您可能必须使用 synaptic 或通过 sudo apt-get purge ruby​​-rvm 命令删除它。您不应该通过 apt-get 安装 rvm。仔细阅读 Ryan 的帖子。安装rvm的正确命令是:

curl -L https://get.rvm.io | bash -s stable

关于ruby-on-rails - 安装 ruby​​ rvm 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12763609/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com