我在编程方面真的很新,我一直在尝试安装Rvm然后再安装Ruby,但是当我尝试在Mac OS X 10.9上安装RVM时,我遇到了困难:
MacBook-Air-de-Lucas:~ lucaslebrun$ \curl -L https://get.rvm.io | bash -s stable
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 184 100 184 0 0 624 0 --:--:-- --:--:-- --:--:-- 625
100 20819 100 20819 0 0 22711 0 --:--:-- --:--:-- --:--:-- 0
Downloading https://github.com/wayneeseguin/rvm/archive/stable.tar.gz
Upgrading the RVM installation in /Users/lucaslebrun/.rvm/
RVM PATH line found in /Users/lucaslebrun/.profile /Users/lucaslebrun/.bashrc /Users/lucaslebrun/.zshrc.
RVM sourcing line found in /Users/lucaslebrun/.bash_profile /Users/lucaslebrun/.zlogin.
Installing rvm gem in 1 gemsets./scripts/functions/gemset: line 118: 18872 Trace/BPT trap: 5 "${rvm_ruby_binary}" -rrubygems -e "$gem_spec" 2> /dev/null
Error running 'command gem install /Users/lucaslebrun/.rvm/gem-cache/rvm-1.11.3.9.gem --local --no-ri --no-rdoc',
showing last 15 lines of /Users/lucaslebrun/.rvm/log/1412952496_ruby-2.1.3/gem.install.rvm.log
[2014-10-10 10:48:16] command
current path: /Users/lucaslebrun/.rvm/src/rvm
GEM_HOME=/Users/lucaslebrun/.rvm/gems/ruby-2.1.3@global
PATH=/Users/lucaslebrun/.rvm/gems/ruby-2.1.3@global/bin:/Users/lucaslebrun/.rvm/rubies/ruby-2.1.3/bin:/Users/lucaslebrun/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
GEM_PATH=/Users/lucaslebrun/.rvm/gems/ruby-2.1.3@global
command(7): command gem install /Users/lucaslebrun/.rvm/gem-cache/rvm-1.11.3.9.gem --local --no-ri --no-rdoc
+ ./scripts/functions/utility_logging : __rvm_log_dotted() 210 > gem install /Users/lucaslebrun/.rvm/gem-cache/rvm-1.11.3.9.gem --local --no-ri --no-rdoc
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
Referenced from: /Users/lucaslebrun/.rvm/rubies/ruby-2.1.3/bin/ruby
Reason: image not found
./scripts/functions/utility_logging: line 210: 18897 Trace/BPT trap: 5 gem install /Users/lucaslebrun/.rvm/gem-cache/rvm-1.11.3.9.gem --local --no-ri --no-rdoc
.
Installing gem-wrappers gem in 1 gemsets./scripts/functions/gemset: line 118: 18934 Trace/BPT trap: 5 "${rvm_ruby_binary}" -rrubygems -e "$gem_spec" 2> /dev/null
Error running 'command gem install gem-wrappers -v >=1.2.4 --no-ri --no-rdoc',
showing last 15 lines of /Users/lucaslebrun/.rvm/log/1412952497_ruby-2.1.3/gem.install.gem-wrappers->=1.2.4.log
[2014-10-10 10:48:17] command
current path: /Users/lucaslebrun/.rvm/src/rvm
GEM_HOME=/Users/lucaslebrun/.rvm/gems/ruby-2.1.3@global
PATH=/Users/lucaslebrun/.rvm/gems/ruby-2.1.3@global/bin:/Users/lucaslebrun/.rvm/rubies/ruby-2.1.3/bin:/Users/lucaslebrun/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
GEM_PATH=/Users/lucaslebrun/.rvm/gems/ruby-2.1.3@global
command(8): command gem install gem-wrappers -v >=1.2.4 --no-ri --no-rdoc
+ ./scripts/functions/utility_logging : __rvm_log_dotted() 210 > gem install gem-wrappers -v '>=1.2.4' --no-ri --no-rdoc
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
Referenced from: /Users/lucaslebrun/.rvm/rubies/ruby-2.1.3/bin/ruby
Reason: image not found
./scripts/functions/utility_logging: line 210: 18958 Trace/BPT trap: 5 gem install gem-wrappers -v >=1.2.4 --no-ri --no-rdoc
.
Upgrade of RVM in /Users/lucaslebrun/.rvm/ is complete.
然后我尝试安装Ruby,但这是我得到的:
Last login: Fri Oct 10 10:51:02 on ttys000
MacBook-Air-de-Lucas:~ lucaslebrun$ type rvm | head -n 1
rvm is a function
MacBook-Air-de-Lucas:~ lucaslebrun$ rvm use ruby --install --default
Warning! PATH is not properly set up, '/Users/lucaslebrun/.rvm/gems/ruby-2.1.3/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.1.3'.
Using /Users/lucaslebrun/.rvm/gems/ruby-2.1.3
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
Referenced from: /Users/lucaslebrun/.rvm/rubies/ruby-2.1.3/bin/ruby
Reason: image not found
MacBook-Air-de-Lucas:~ lucaslebrun$ ruby -v
我该怎么办?
答案 0 :(得分:0)
这是破碎的二进制版本的ruby 2.1.3,你可以用以下方法修复它:
rvm reinstall 2.1.3 --disable-binary