【问题标题】:Phusion Passenger got an g++: Internal errorPhusion 乘客得到了一个 g++:内部错误
【发布时间】:2012-11-08 05:53:29
【问题描述】:

我已使用以下命令成功安装了 paggger gem

rvmsuo gem install passenger

之后,当我尝试使用以下命令为 apache2 安装乘客模块时

rvmsudo passenger-install-apache2-module

安装开始,所有的依赖都检查通过了,编译的时候出现如下错误,

g++ ApplicationPoolServerExecutable.cpp System.o Utils.o Logging.o -o 
    ApplicationPoolServerExecutable -I.. -D_REENTRANT -g -DPASSENGER_DEBUG -Wall -
    I/usr/local/include   -DPASSENGER_DEBUG ../boost/src/libboost_thread.a -lpthread
    g++: Internal error: Killed (program cc1plus)
    Please submit a full bug report.
    See <URL:http://gcc.gnu.org/bugs.html> for instructions.
    For Debian GNU/Linux specific bug reporting instructions, see <an url goes here>

    rake aborted!
    Command failed with status (1): [g++ ApplicationPoolServerExecutable.cpp Sy...]
    /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/passenger-
    2.0.6/Rakefile:161

我已经检查了 apache 错误日志,但是我没有任何线索。

【问题讨论】:

  • 一位先生对此问题投了反对票,在投反对票之前,如果该人明确说明他这样做的原因,将有助于全面采取纠正措施。如果有人在理解问题或其他方面有任何问题,在投票之前,您可以通过添加评论来提问......无论如何,谢谢。

标签: apache2 rvm passenger


【解决方案1】:

如果你没有足够的内存,你可以在你的 Linux 机器上做一些临时调整。

# Add 2GB of swap space
dd if=/dev/zero of=/swap bs=1k count=2048k
mkswap /swap
swapon /swap

# Set overcommit to 100
sysctl vm.overcommit_ratio=100

# Set swappiness (encourages more swapping)
sysctl vm.swappiness=50

之后,重试。如果一切顺利,简单的重新启动应该会撤消这些更改,或者,当然,您可以将 sysctl 设置回其原始值并删除交换。请记住,重新启动不会释放磁盘空间,您需要在重新启动后rm /swap

【讨论】:

    【解决方案2】:

    我试图在包含 256 mb 内存的虚拟机中运行它。当我为该虚拟机分配更多内存(1 GB)时,问题就解决了。

    【讨论】:

      猜你喜欢
      • 2015-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多