编译php报错:virtual memory exhausted: Cannot allocate memory

编译php报错:virtual memory exhausted: Cannot allocate memory

1、发生该问题的原因是服务器的内存不够,从而导致编译失败。
2、解决办法:https://bugs.php.net/bug.php?id=48809

PHP7.png

3、编译成功
PHP7.1.png

4、编译命令

./configure --prefix=/var/php7 \--with-config-file-path=/var/php7/etc \--with-config-file-scan-dir=/var/php7/etc/php.d \--enable-mysqlnd \--with-mysqli \--with-pdo-mysql \--enable-fpm \--with-gd \--with-iconv \--with-zlib \--enable-xml \--enable-shmop \--enable-sysvsem \--enable-inline-optimization \--enable-mbregex \--enable-mbstring \--enable-ftp \--enable-gd-native-ttf \--enable-pcntl \--enable-sockets \--with-xmlrpc \--enable-zip \--enable-bcmath \--enable-soap \--without-pear \--with-gettext \--enable-session \--with-curl \--with-jpeg-dir \--with-freetype-dir \--enable-sqlite-utf8 \--enable-sysvmsg \--enable-sysvshm \--enable-wddx \--with-xsl \--enable-opcache \--disable-fileinfo

5、安装

sudo make && make install

标签: none

添加新评论