新手问题 [已解决] 求助,服务器上安装 passenger 出现的问题

tsaikoga · 2013年12月16日 · 最后由 liurui12w 回复于 2018年05月22日 · 6495 次阅读

按照 在 Ubuntu 12.04 Server 上安装部署 Ruby on Rails 应用 的方法,当我敲到:

sudo passenger-install-nginx-module

出现如下错误:

/Implementation.cpp g++: internal compiler error: Killed (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-4.7/README.Bugs for instructions. rake aborted! ----------------------------------------------- Your compiler failed with the exit status 4. This probably means that it ran out of memory. To solve this problem, try increasing your swap space: https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04 /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/build/cplusplus_support.rb:40:in run_compiler' /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/build/cplusplus_support.rb:61:incompile_cxx' /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/lib/phusion_passenger/common_library.rb:133:in `block (2 levels) in define_category_tasks' Tasks: TOP => nginx => nginx_without_native_support => buildout/agents/PassengerHelperAgent => buildout/common/libpassenger_common/ApplicationPool2/Implementation.o (See full trace by running task with --trace) --------------------------------------------

It looks like something went wrong

Please read our Users guide for troubleshooting tips:

/usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.29/doc/Users guide Nginx.html http://www.modrails.com/documentation/Users%20guide%20Nginx.html

If that doesn't help, please use our support facilities. We'll do our best to help you.

http://www.phusionpassenger.com/support


我的 ruby 版本是 2.0.0 rails 版本是 4.0.0 passenger 版本是 4.0.29

然后,我就设置了 swap,但是不管设置到多大,它还是报一样的错误,请高手帮忙解决。

能贴下这个吗free -m 有没有换个老点的版本试过

现在 passenger 有提供 deb 包了的,免编译,去看看官方文档。

#1 楼 @lang1pal 使用 ruby 1.9.3p484 还是一样的错。

#2 楼 @Rei 我按照官网 apt-get install libapache2-mod-passenger,也 git clone git://github.com/jnstq/rails-nginx-passenger-ubuntu.git,并设置开机启动Nginx; 而在 opt/nginx/中没有 conf/目录,我是否还要安装些什么?

楼主请教一下 我也是这样的问题 如何解决的

需要 登录 后方可回复, 如果你还没有账号请 注册新账号