2012-11-08 66 views
-1

我一直在使用下面的命令的Phusion乘客有一個G ++:內部錯誤

rvmsuo gem install passenger 

後已成功安裝paggenger寶石,當我試圖安裝乘客模塊使用的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的錯誤日誌,但是,我沒有任何線索。

+0

一位先生對這個問題提出了否定的投票,在投票結束前,如果該人明確說明他爲什麼這樣做,這將有助於全面採取糾正措施。如果任何人在投票之前有任何問題需要理解問題或者其他問題,您可以通過添加評論來提問......任何方式,謝謝。 – suvankar

回答

1

我試圖在由256 MB RAM組成的虛擬機中運行它。當我爲該虛擬機分配更多內存(1 GB)時,問題就解決了。

2

如果你沒有足夠的內存,你可以在你的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

+0

感謝您分享提示 – suvankar