【问题标题】:Reinstall RVM resulting in Unrecognized command line argument 'impode'重新安装 RVM 导致无法识别的命令行参数“impode”
【发布时间】:2012-11-08 18:32:15
【问题描述】:

在我可以说:“我已经尝试了一切”之前,我应该在这里发帖。所以,这是我的问题。
我遇到了ruby 1.9.3-p194 的问题。我的终端卡在每个(!)涉及 ruby​​ 或 rails 的命令上。 (例如rails s mongrel 甚至rails -v 和ruby -v)

一切都是从这件奇怪的事情开始的:

$ rvm use 1.9.3-p194
Using /usr/local/rvm/gems/ruby-1.9.3-p194

$ bundle exec rails s mongrel

然后卡住了。 所以,我想知道我安装了哪些版本的 ruby​​:

$ rvm list

rvm rubies

ruby-1.8.7-p370 [ i686 ]

# => - current
# =* - current && default
#  * - default

嗯?!那么我使用的是未安装的 ruby​​ 版本吗?


经过一些研究,许多建议是重新安装整个软件包。 所以,我试过了。

$ rvm uninstall 1.9.3-p194
Removing /usr/local/rvm/src/ruby-1.9.3-p194...
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.

再次,只是为了确保..

$ rvm uninstall 1.9.3-p194
/usr/local/rvm/src/ruby-1.9.3-p194 has already been removed.
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.

嗯,看起来不错。 (除了在第一次尝试时已经删除了一半......:|)
那么:

错误 #1

$ rvm reinstall 1.9.3-p194
Removing /usr/local/rvm/src/ruby-1.9.3-p194...
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
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...
ruby-1.9.3-p194 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p194 (already extracted)
ruby-1.9.3-p194 - #autoreconf
Error running 'autoreconf', please read /usr/local/rvm/log/ruby-1.9.3-p194/autoreconf.log
Skipping configure step, 'configure' does not exist, did autoreconf not run successfully?
ruby-1.9.3-p194 - #compiling

Error running 'make', please read /usr/local/rvm/log/ruby-1.9.3-p194/make.log
There has been an error while running make. Halting the installation.

下一步是:

$ rvm uninstall 1.9.3-p194
Removing /usr/local/rvm/src/ruby-1.9.3-p194...
/usr/local/rvm/rubies/ruby-1.9.3-p194 has already been removed.
Removing default ruby interpreter

$ rvm list

rvm rubies


# No rvm rubies installed yet. Try 'rvm help install'.

所以我检查了help install,但没有发现任何帮助。至少,我还没有看到解决方案..
下一个:

错误 #2

$ rvm install 1.9.3-p194
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
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...
ruby-1.9.3-p194 - #extracting ruby-1.9.3-p194 to /usr/local/rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p194
ruby-1.9.3-p194 - #configuring

Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include -L/usr/local/rvm/usr/lib ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p194', please read /usr/local/rvm/log/ruby-1.9.3-p194/configure.log
There has been an error while running configure. Halting the installation.

现在,我想卸载 rvm:

$ brew uninstall rvm
Error: No such keg: /usr/local/Cellar/rvm

好的..让我们检查一下它是否仍然有效..?

$ rvm

<listed standard output, thought that'd be useless here..>

是的,它还在那里。让我们尝试再次安装 1.9.3..

错误 #2(与之前相同..)

$ rvm install 1.9.3
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p327.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p327, this may take a while depending on your cpu(s)...
ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while depending on your connection...
ruby-1.9.3-p327 - #extracting ruby-1.9.3-p327 to /usr/local/rvm/src/ruby-1.9.3-p327
ruby-1.9.3-p327 - #extracted to /usr/local/rvm/src/ruby-1.9.3-p327
ruby-1.9.3-p327 - #configuring

Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include -L/usr/local/rvm/usr/lib ./configure --enable-shared --disable-install-doc --prefix=/usr/local/rvm/rubies/ruby-1.9.3-p327', please read /usr/local/rvm/log/ruby-1.9.3-p327/configure.log
There has been an error while running configure. Halting the installation.

然后我找到了一个“解决方案...”,#not..

$ umask g+w
$ export -a rvm_configure_env
$ rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')

没有成功。。 我尝试再次安装 1.9.3,再次引发 error #2

我就是这么想的。让我们把所有的东西都内爆..(将其作为一种可能的解决方案来阅读)

$ rvm implode
Are you SURE you wish for rvm to implode?
This will recursively remove /usr/local/rvm and other rvm traces?
(anything other than 'yes' will cancel) > yes
Removing rvm-shipped binaries (rvm-prompt, rvm, rvm-sudo rvm-shell and rvm-auto-ruby)
Removing rvm wrappers in /usr/local/rvm/bin
Hai! Removing /usr/local/rvm
rm: /etc/profile.d/rvm.sh: Permission denied
/usr/local/rvm has been removed.
rvm has been fully removed. Note you may need to manually remove /etc/rvmrc and ~/.rvmrc if they exist still.

哦..Permission denied不错...

$ sudo rvm implode
Password:
sudo: rvm: command not found

万岁!它终于被删除了。

让我们重新安装它..

$ gem install rvm
Successfully installed rvm-1.11.3.5
1 gem installed
Installing ri documentation for rvm-1.11.3.5...
Installing RDoc documentation for rvm-1.11.3.5...

什么?!一次尝试后?好的.. :) 不过后来……

错误 #3

$ rvm install 1.9.3-p194
cat: /usr/local/rvm/VERSION: No such file or directory
-bash: /usr/local/rvm/scripts/base: No such file or directory
Unrecognized command line argument: 'impode' ( see: 'rvm usage' )

impode.. ?什么?!嗯,这可能是早期的错字..

然后我尝试了一些其他命令,一遍又一遍地返回相同的错误:

ifonteijne:dash Kers$ rvm install 1.9.3-p194 cat: /usr/local/rvm/VERSION: 没有这样的文件或目录 -bash: /usr/local/rvm/scripts/base: 没有这样的文件或目录 无法识别的命令行参数:“imstall”(参见:“rvm usage”) ifonteijne:dash Kers$ rvm impode cat: /usr/local/rvm/VERSION: 没有这样的文件或目录 -bash: /usr/local/rvm/scripts/base: 没有这样的文件或目录 无法识别的命令行参数:“impode”(参见:“rvm 用法”) ifonteijne:dash Kers$ rvm 内爆 cat: /usr/local/rvm/VERSION: 没有这样的文件或目录 -bash: /usr/local/rvm/scripts/base: 没有这样的文件或目录 无法识别的命令行参数:“impode”(参见:“rvm 用法”) ifonteijne:dash Kers$ rvm install cat: /usr/local/rvm/VERSION: 没有这样的文件或目录 -bash: /usr/local/rvm/scripts/base: 没有这样的文件或目录 无法识别的命令行参数:“impode”(参见:“rvm 用法”)

现在我被困在......

如果有人可以帮助我,请。

我要安装:Ruby 1.9.3-p194 到 RVM

== 编辑 == 试过了:

$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

# Kers,
#
#   Thank you for using RVM!
#   I sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne

嗯,这行得通。

$ rvm install 1.9.3-p194
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p194.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
You requested building with '/Developer/usr/bin/gcc' but it is not in your path.

$ brew install gcc
==> Installing gcc dependency: gmp
==> Downloading http://ftpmirror.gnu.org/gmp/gmp-5.0.5.tar.bz2
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/gmp/5.0.5 --enable-cxx --build=x86_64-apple-darwin
==> make
==> make check
==> make install
                 (...)
Xcode: 4.5.2 => /Volumes/SATA/Applications/Xcode.app/Contents/Developer
CLT: 1.0.0.9000000000.1.1249367152
Error: Homebrew doesn't know what compiler versions ship with your version of
Xcode. Please file an issue with the output of `brew --config`:
  https://github.com/mxcl/homebrew/issues

Error: Failed executing: make (mpfr.rb:31)

如前所述:

$ brew --config
HOMEBREW_VERSION: 0.9.3
HEAD: 360be75b4c4e286365d71664d9a8ab277d7b1fb3
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit arrandale
OS X: 10.8.2-x86_64
Xcode: 4.5.2 => /Volumes/SATA/Applications/Xcode.app/Contents/Developer
CLT: 1.0.0.9000000000.1.1249367152
GCC-4.2: build 5666
LLVM-GCC: build 2335
Clang: 2.1 build 163
X11: 2.7.3 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

希望这可能会有所帮助。

【问题讨论】:

  • 嗨,再次删除当前的 rvm。如果必须手动删除 rvm 文件夹(检查以确保它已消失)。删除 .bashrc 中与 rvm 相关的行,然后使用以下命令再次安装 rvm: curl -L get.rvm.io | bash -s stable --ruby 然后告诉我会发生什么:)
  • 完美运行,谢谢。现在通过brew install --use-llvm gcc 安装 gcc。因为我之前提到的 Xcode 错误。再次感谢!
  • 已经在 ==&gt; make bootstrap 上待了 30 分钟...
  • @rik.vanmechelen,是的!我把我的macbook留在了工作中,今天早上检查了一下,它安装正确!太感谢了!现在我正在安装 Rails,希望我可以继续我的项目。再次感谢!

标签: ruby ruby-on-rails-3 terminal rvm


【解决方案1】:

感谢rik.vanmechelen的评论,修复了它。

结论:

删除红宝石

$ ruby implode

安装 Ruby

注意:==&gt; Make Bootstrap 需要(非常)长时间。

$ curl -L get.rvm.io | bash -s stable --ruby

安装 gcc

注意:这不是它的标准命令,我使用它是因为 Xcode 的“命令行”错误。

$ brew install --use-llvm gcc

安装 Rails

$ sudo gem install rails

然后我就可以走了。



rik.vanmechelen,再次感谢。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-02-27
    • 1970-01-01
    • 1970-01-01
    • 2018-12-26
    • 2020-12-16
    • 2016-02-28
    • 1970-01-01
    相关资源
    最近更新 更多