安装Php时候报错信息:virtual memory exhausted: Cannot allocate memory (不能分配内存)

原因是fileinfo这个函数在编译时非常消耗内存,而系统内存又不够了,所以才会出现此问题。

网上找了方法:

1,关闭其他占用大内存的进程。

2,在编译是添加参数 --disable-fileinfo 

原文地址:https://www.cnblogs.com/lin1/p/5749265.html