我一直对“未能建立宝石原生扩展”感到绝望

时间:2013-11-07 13:40:36

标签: ruby-on-rails linux gem install ubuntu-13.04

我在我的ubuntu 13.04上安装了rvm和ruby 2.0.0,一切都很好,但是当我安装rails 4.0.0时,最后一步出错了 以下是我运行后发生的事情:“gem install rails -v 4.0.0”:

**Building native extensions.  This could take a while...
ERROR:  Error installing rails:
    ERROR: Failed to build gem native extension.
    /home/adolph/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
creating Makefile
make
compiling atomic_reference.c
linking shared-object atomic_reference.so
make install
/usr/bin/install -c -m 0755 atomic_reference.so /home/adolph/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.14/lib/home/adolph/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-linux
/usr/bin/install: cannot create regular file ‘/home/adolph/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.14/lib/home/adolph/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-linux’: No such file or directory
make: *** [install-so] Error 1
Gem files will remain installed in /home/adolph/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.14 for inspection.
Results logged to /home/adolph/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.14/ext/gem_make.out**

It looks like the *‘/home/adolph/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.14/lib/home/adolph/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/x86_64-linux’* doesn't exist.

请帮助我!

1 个答案:

答案 0 :(得分:-1)

你可以试试这个

sudo apt-get install build-essential

之后

sudo gem install rails