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

tsaikoga · December 16, 2013 · Last by liurui12w replied at May 22, 2018 · 6472 hits

按照 在 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/目录,我是否还要安装些什么?

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

You need to Sign in before reply, if you don't have an account, please Sign up first.