gpt4 book ai didi

c++ - 在 VSP 中为 apache 编译 passenger 时出现错误 "out of memory allocating"

转载 作者:行者123 更新时间:2023-11-28 06:53:34 24 4
gpt4 key购买 nike

我在 VPS (OpenVz) 1GB Ram、512MB SWAP 中运行 debian 7.0 (amd64) 并尝试安装 OpenProject .但是如果我尝试为 Apache 编译 Passenger

passenger-install-apache2-module

我收到以下错误消息:

cc1plus: out of memory allocating 2048 bytes after a total of 5304320 bytes
rake aborted!
Command failed with status (1): [c++ -Iext -Iext/common -Iext/libev -fPIC -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_REENTRANT -I/usr/include -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/xmltok -pthread -I/usr/include/apache2 -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -fcommon -feliminate-unused-debug-symbols -feliminate-unused-debug-types -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -Wno-attributes -ggdb -DHAS_ALLOCA_H -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -std=gnu++11 -DHASH_NAMESPACE="__gnu_cxx" -DHASH_MAP_HEADER="<hash_map>" -DHASH_MAP_CLASS="hash_map" -DHASH_FUN_H="<hash_fun.h>" -o buildout/apache2/module_libpassenger_common/Logging.o -c ext/common/Logging.cpp]
/home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.41/build/cplusplus_support.rb:51:in `run_compiler'
/home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.41/build/cplusplus_support.rb:61:in `compile_cxx'
/home/openproject/.rvm/gems/ruby-2.1.0/gems/passenger-4.0.41/lib/phusion_passenger/common_library.rb:133:in `block (2 levels) in define_category_tasks'
Tasks: TOP => apache2 => buildout/apache2/mod_passenger.so => buildout/apache2/module_libpassenger_common/Logging.o

我认为问题是,我的交换分区太小了,但由于 OpenVz 虚拟化,我无法设置更多

 swapon failed: Operation not permitted

有没有人有解决这个问题的想法?谢谢大家!

最佳答案

您必须获得一个具有更多 RAM 的服务器,或者一个不使用 OpenVZ 的服务器,以便您可以启用交换。对不起。别无他法。

关于c++ - 在 VSP 中为 apache 编译 passenger 时出现错误 "out of memory allocating",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23457997/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com