没有足够的内存来构建幻影.js - 该怎么办?



我正在尝试在VPS服务器(1Gb RAM)上编译幻影.js。生成过程生成错误(持续):

obj/svg/SVGAllInOne.o svg/SVGAllInOne.cpp
{standard input}: Assembler messages:
{standard input}:168320: Warning: end of file not at end of a line;         
newline inserted
{standard input}: Error: open CFI at the end of file; missing              
.cfi_endproc directive
g++: internal compiler error: Killed (program cc1plus)

http://forum.qt.io/topic/22672/g-crash-when-compiling-qt5,我在这里发现了同一文件的问题。人们在那里说:没有足够的记忆。

在这种情况下我该怎么办?Phantom.js网站上的信息说它应该从源代码构建。

另外:这绝对是内存不足的情况,因为我刚刚收到来自提供商的消息,说服务器内存不足。

您可以为VPS添加交换分区,也可以只添加交换文件来扩展虚拟内存:http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/。

您也可以尝试在具有更多内存的其他系统上构建幻.js,然后将其复制到目标VPS。但是您需要确保两个系统具有相同的体系结构和相同的环境(编译器版本,库等)。

我遇到了同样的问题。我重新运行 build.sh 通过--jobs 1,它奏效了。

最新更新