2012-03-05 201 views
0

一切正常,直到我運行bundle install命令,在從服務器執行更新(更新的文件與Gemfile沒有任何關係,或與寶石相關的任何內容)之後,使用SVN。安裝bcrypt-ruby gem時出現的安裝包錯誤

注意:我運行的是Ruby 1.8.7-p358,並且我已經在這個項目上運行了幾個月,沒有任何問題。

當我運行該命令我得到的錯誤是:

Installing bcrypt-ruby (3.0.1) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

     /home/brian/.rvm/rubies/ruby-1.8.7-p358/bin/ruby extconf.rb 
creating Makefile 

make 
Makefile:128: warning: overriding commands for target `/home/brian/Projects/DB' 
Makefile:122: warning: ignoring old commands for target `/home/brian/Projects/DB' 
gcc -I. -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -fPIC -c crypt_blowfish.c 
gcc -I. -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -fPIC -c wrapper.c 
gcc -I. -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -fPIC -c crypt_gensalt.c 
gcc -I. -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -fPIC -c crypt.c 
gcc -I. -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib/ruby/1.8/i686-linux -I. -D_FILE_OFFSET_BITS=64 -fPIC -g -O2 -fPIC -c bcrypt_ext.c 
gcc -shared -o bcrypt_ext.so crypt_blowfish.o wrapper.o crypt_gensalt.o crypt.o bcrypt_ext.o -L. -L/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib -Wl,-R/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib -L/home/brian/.rvm/rubies/ruby-1.8.7-p358/lib -lruby -lrt -ldl -lcrypt -lm -lc 

make install 
Makefile:128: warning: overriding commands for target `/home/brian/Projects/DB' 
Makefile:122: warning: ignoring old commands for target `/home/brian/Projects/DB' 
mkdir -p /home/brian/Projects/DB 
mkdir -p Soft/ClienteHabitue/Commerce/src/commerce/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-3.0.1/lib 
/usr/bin/install -c -m 0755 bcrypt_ext.so /home/brian/Projects/DB Soft/ClienteHabitue/Commerce/src/commerce/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-3.0.1/lib 
/usr/bin/install: omitting directory `/home/brian/Projects/DB' 
make: *** [Soft/ClienteHabitue/Commerce/src/commerce/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-3.0.1/lib/bcrypt_ext.so] Error 1 


Gem files will remain installed in /home/brian/Projects/DB Soft/ClienteHabitue/Commerce/src/commerce/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-3.0.1 for inspection. 
Results logged to /home/brian/Projects/DB Soft/ClienteHabitue/Commerce/src/commerce/vendor/bundle/ruby/1.8/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out 
An error occured while installing bcrypt-ruby (3.0.1), and Bundler cannot continue. 
Make sure that `gem install bcrypt-ruby -v '3.0.1'` succeeds before bundling. 

我GOOGLE了,也試過在論壇上進行搜索,但我沒有發現,實際工作的答案我。

請問有誰能告訴我發生了什麼事以及如何解決它?

謝謝!

+0

是什麼'創業板安裝bcrypt-紅寶石-v「3.0.1''在錯誤的方式提供? – ScottJShea 2012-03-05 21:40:42

+0

什麼都沒有。它安裝沒有問題,但捆綁安裝命令保持失敗... – 2012-03-06 01:09:22

回答

0

看來你還沒有安裝開發套件。您需要先安裝ruby開發工具包,然後安裝Bcrypt ruby​​ gem。

sudo apt-get install ruby1.8-dev 

然後

bundle install 
+0

似乎我已經安​​裝,因爲當我運行該命令時,我得到以下內容:正在讀取軟件包列表...完成 構建依賴關係樹 讀取狀態信息...完成 ruby​​1.8-dev已經是最新版本。 0升級,0新安裝,0刪除和190未升級。 – 2012-03-06 13:40:48

+0

在你的gemfile文件中? – 2012-03-06 14:01:40

+0

也許你需要重新安裝rvm,然後安裝ruby1.8-dev軟件包,然後安裝bcrypt ruby​​ – 2012-03-06 14:03:26