编译安装php时遇到virtual memory exhausted: Cannot allocate memory
2013-12-05 13:48
405 查看
编译安装php时遇到virtual memory exhausted: Cannot allocate memory
有时候用vps建站时需要通过编译的方式来安装主机控制面板。对于大内存的VPS来说一般问题不大,但是对于小内存,比如512MB内存的VPS来说,很有可能会出现问题,因为编译过程是一个内存消耗较大的动作。
本人近期就遇到一个这样的问题:在512MB内存centos操作系统的VPS上编译安装某国内主机控制面板,在编译安装php时日志中有如下错误记录:
virtual memory exhausted: Cannot allocate memory
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
开始时的解决方法是先将很多的进程关闭,比如httpd、ftpd、sendmail等等,释放出了一部分内存后,再进行编译,仍然得到同样的编译错误。后来百度谷歌了很久才找到解决问题的方法,而且是在php.net上找到的解决方法,解决方法在https://bugs.php.net/bug.php?id=48809最后的跟帖中。
根据这个文章的方法将php安装配置文件中加了引号中的配置(不包括引号)“--disable-fileinfo”后终于编译通过。这里分享出来供参考。本文来自http://hostbus.net/forum.php?mod=viewthread&tid=173023
有时候用vps建站时需要通过编译的方式来安装主机控制面板。对于大内存的VPS来说一般问题不大,但是对于小内存,比如512MB内存的VPS来说,很有可能会出现问题,因为编译过程是一个内存消耗较大的动作。
本人近期就遇到一个这样的问题:在512MB内存centos操作系统的VPS上编译安装某国内主机控制面板,在编译安装php时日志中有如下错误记录:
virtual memory exhausted: Cannot allocate memory
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
开始时的解决方法是先将很多的进程关闭,比如httpd、ftpd、sendmail等等,释放出了一部分内存后,再进行编译,仍然得到同样的编译错误。后来百度谷歌了很久才找到解决问题的方法,而且是在php.net上找到的解决方法,解决方法在https://bugs.php.net/bug.php?id=48809最后的跟帖中。
根据这个文章的方法将php安装配置文件中加了引号中的配置(不包括引号)“--disable-fileinfo”后终于编译通过。这里分享出来供参考。本文来自http://hostbus.net/forum.php?mod=viewthread&tid=173023
相关文章推荐
- 编译安装php时遇到virtual memory exhausted: Cannot allocate memory
- 编译安装php时遇到virtual memory exhausted: Cannot allocate memory
- 编译安装php时遇到virtual memory exhausted: Cannot allocate memory
- 阿里云ECS云服务器编译安装PHP遇到virtual memory exhausted: Cannot allocate memory
- PHP源码安装出现virtual memory exhausted: Cannot allocate memory
- 滴滴云服务器安装php的时候报错virtual memory exhausted: Cannot allocate memory make: *** [ext/fileinfo/libmagic/ap
- 编译安装php时遇到virtual memory exhausted: Cannot allocat
- php编译 :virtual memory exhausted: Cannot allocate memory
- 编译时:virtual memory exhausted: Cannot allocate memory
- android4.4编译失败,出现“virtual memory exhausted: Cannot allocate memory”
- 编译时:virtual memory exhausted: Cannot allocate memory
- 编译时:virtual memory exhausted: Cannot allocate memory
- 编译时:virtual memory exhausted: Cannot allocate memory
- 编译QT程序出现virtual memory exhausted: Cannot allocate memory
- Linux编译时:virtual memory exhausted: Cannot allocate memory
- 编译时:virtual memory exhausted: Cannot allocate memory
- 编译时:virtual memory exhausted: Cannot allocate memory,常见于VPS
- 编译时:virtual memory exhausted: Cannot allocate memory(转)
- 编译出现错误virtual memory exhausted: Cannot allocate memory
- 编译时:virtual memory exhausted: Cannot allocate memory