运行cap:deploy时出现此错误
我已经运行了apt-get update和apt-get upgrade
我已经运行了包安装,将Gemfile和Gemfile.lock添加到存储库。
* executing "cd /var/www/releases/20120606045148 && bundle install --gemfile /var/www/releases/20120606045148/Gemfile --path /var/www/shared/bundle --deployment --quiet --without development test"
servers: ["11.111.11.11"]
[11.111.11.11] executing command
** [out :: 11.111.11.11] Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
** [out :: 11.111.11.11]
** [out :: 11.111.11.11] /usr/bin/ruby1.9.1 extconf.rb
** [out :: 11.111.11.11] Compiling V8
** [out :: 11.111.11.11] cp -r scons build
** [out :: 11.111.11.11] make: ruby: Command not found
** [out :: 11.111.11.11] make: ruby: Command not found
** [out :: 11.111.11.11] cd build/v8 && GCC_VERSION= ../scons/install/bin/scons arch=
** [out :: 11.111.11.11] scons: Reading SConscript files ...
** [out :: 11.111.11.11] Unknown arch value ''. Possible values are (arm, ia32, x64, mips).
** [out :: 11.111.11.11] make: *** [build/v8/libv8.a] Error 1
** [out :: 11.111.11.11] *** extconf.rb failed ***
** [out :: 11.111.11.11] Could not create Makefile due to some reason, probably lack of
** [out :: 11.111.11.11] necessary libraries and/or headers. Check the mkmf.log file for more
** [out :: 11.111.11.11] details. You may need configuration options.
** [out :: 11.111.11.11]
** [out :: 11.111.11.11] Provided configuration options:
** [out :: 11.111.11.11] --with-opt-dir
** [out :: 11.111.11.11] --without-opt-dir
** [out :: 11.111.11.11] --with-opt-include
** [out :: 11.111.11.11] --without-opt-include=${opt-dir}/include
** [out :: 11.111.11.11] --with-opt-lib
** [out :: 11.111.11.11] --without-opt-lib=${opt-dir}/lib
** [out :: 11.111.11.11] --with-make-prog
** [out :: 11.111.11.11] --without-make-prog
** [out :: 11.111.11.11] --srcdir=.
** [out :: 11.111.11.11] --curdir
** [out :: 11.111.11.11] --ruby=/usr/bin/ruby1.9.1
** [out :: 11.111.11.11] extconf.rb:10:in `<main>': Error compiling V8 (RuntimeError)
** [out :: 11.111.11.11]
** [out :: 11.111.11.11]
** [out :: 11.111.11.11] Gem files will remain installed in /var/www/shared/bundle/ruby/1.9.1/gems/therubyracer-0.8.2 for inspection.
** [out :: 11.111.11.11] Results logged to /var/www/shared/bundle/ruby/1.9.1/gems/therubyracer-0.8.2/ext/v8/gem_make.out
** [out :: 11.111.11.11] An error occured while installing therubyracer (0.8.2), and Bundler cannot continue.
** [out :: 11.111.11.11] Make sure that `gem install therubyracer -v '0.8.2'` succeeds before bundling.
command finished in 73622ms
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/releases/20120606045148; true"
servers: ["11.111.11.11"]
[11.111.11.11] executing command
command finished in 7100ms
failed: "env PATH=/var/lib/gems/1.9.1/bin:$PATH sh -c 'cd /var/www/releases/20120606045148 && bundle install --gemfile /var/www/releases/20120606045148/Gemfile --path /var/www/shared/bundle --deployment --quiet --without development test'" on 11.111.11.11发布于 2012-08-31 04:19:54
我建议在这里安装rvm -正如Joshua Cheek所说,问题似乎出在ruby二进制文件上,这应该由rvm来帮助。
执行apt-get install rvm,一旦安装完成,运行rvm list known会给出一个可用的ruby版本列表;使用rvm install (version)安装你想要的版本,然后安装rvm use (version) (不包括括号)。
这样做将确保您有一个干净的ruby安装,以及可用的ruby命令和干净的gemset。
然后你应该能够做apt-get install libv8 -如果你仍然有问题,做一个错误消息的编辑,我们将从那里开始。
发布于 2012-08-30 06:58:46
看起来您的ruby二进制文件名为ruby1.9.1,但它试图调用二进制文件ruby。您可能会在路径中的某个位置放置一个名为'ruby‘的符号链接,并将其指向/usr/bin/ruby1.9.1。
https://stackoverflow.com/questions/10908487
复制相似问题