一切运行良好,直到我运行bundle install
命令后,使用SVN从服务器执行更新(更新的文件与Gemfile没有任何关系,或与gems有关)。
注意:我正在运行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 :(得分:0)
好像你没有安装开发套件。您需要先为ruby安装开发套件,然后安装Bcrypt ruby gem。
sudo apt-get install ruby1.8-dev
然后
bundle install