PHP official update is very diligent. A few days to see, and updated. So upgrade the VPS PHP chant. The compiler ran running with the following error:cc:internal error:killed (program CC1)
obviously this is a compilation process that was killed by the system, and I've encountered this many times when I tested the lamp one-click installation script. The reason is that memory is too small to cause. Today, this error occurs when compiling a 256MB-Ram VPS. Usually, in the x64 system small memory VPS is more common.
This was also the case when testing on the Aliyun 512MB VPS. The solution is to configure add an option –disable-fileinfo while compiling PHP, while shutting down some running processes such as mysqld,httpd and so on to save memory.
There is to increase the swap partition (if the VPS does not exist in the case of swap, such as Digitalocean default does not have a swap), can also help solve the problem of small memory compilation. How to add a swap partition to a digitalocean system see: http://www.111cn.net/sys/CentOS/56848.htm
Through the steps above, I successfully compile PHP on the 256MB buyvm VPS.
Attach my complete compile PHP configure option (see: Lamp One-click installation script) for more details:
The code is as follows |
Copy Code |
./configure--prefix=/usr/ local/php--with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc--with-mysqli= /usr/local/mysql/bin/mysql_config--with-pdo-mysql--with-mysql-sock=/usr/local/mysql/mysql.sock-- WITH-CONFIG-FILE-SCAN-DIR=/USR/LOCAL/PHP/PHP.D--with-openssl--with-zlib--with-curl--enable-ftp--WITH-GD-- With-jpeg-dir--with-png-dir--with-freetype-dir--with-xmlrpc--enable-calendar--with-imap-- With-imap-ssl--with-ldap--enable-bcmath--enable-exif--enable-wddx--enable-tokenizer-- Enable-sockets--enable-ctype--enable-gd-native-ttf--enable-mbstring--enable-intl--enable-xml-- Enable-json--enable-session--enable-soap--with-mcrypt--enable-zip--with-iconv=/usr/local/libiconv /usr/local/mysql--with-icu-dir=/usr--with-mhash=/usr--with-pcre-dir--without-pear--disable-fileinfo |