cant compile PHP on lowend VPS

#1
Hello,

I'm trying to compile php with config:

'--with-mysql' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-xml2' '--with-curl' '--with-libdir=lib64' '--with-jpeg-dir=/usr/lib64/' '--with-litespeed' '--with-openssl'


I'm getting this in log:

-I/usr/local/lsws/phpbuild/php-5.5.19/ext/mbstring/libmbfl/mbfl -I/usr/local/lsws/phpbuild/php-5.5.19/ext/sqlite3/libsqlite -I/usr/local/lsws/phpbuild/php-5.5.19/TSRM -I/usr/local/lsws/phpbuild/php-5.5.19/Zend -I/usr/include -g -O2 -fvisibility=hidden -c /usr/local/lsws/phpbuild/php-5.5.19/ext/fileinfo/libmagic/apprentice.c -o ext/fileinfo/libmagic/apprentice.lo
cc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
**ERROR** Could not compile PHP

This is a 128MB VPS with Debian 7 minimal install on it.
 

duy1313

New Member
#2
Prepared:

Code:
apt-get update
sudo apt-get install build-essential
sudo apt-get install libpcre3-dev libexpat1-dev libssl-dev libgeoip-dev zlib1g-dev

apt-get install build-essential gcc make cmake libssl-dev libxml2-dev libpng-dev libjpeg-dev libcurl4-openssl-dev libbz2-dev libncurses5 libncurses5-dev libaio1 libmcrypt-dev

apt-get -y install autoconf automake flex bison libbz2-dev libc-client-dev libc-client2007e-dev libXpm-dev  libmysqlclient15-dev libmysqlclient-dev libxml2 libxml2-dev curl libcurl4-nss-dev libjpeg8 libjpeg8-dev libpng12-0 libpng12-dev libfreetype6 libfreetype6-dev mcrypt libmcrypt4 libmcrypt-dev libexpat1-dev libxslt1.1 libxslt1-dev build-essential libkrb5-dev

mkdir -p /usr/kerberos/
ln -sf /usr/include/ /usr/kerberos/include

Debian/Ubuntu i386:
ln -sf /usr/lib/i386-linux-gnu/ /usr/kerberos/lib
Debian/Ubuntu x86_64:
ln -sf /usr/lib/x86_64-linux-gnu/ /usr/kerberos/lib
Compile PHP:
Code:
./configure '--prefix=/usr/local/lsws/lsphp55' '--with-config-file-path=/usr/local/lsws/lsphp55/etc' '--enable-bcmath' '--enable-gd-native-ttf' '--enable-mbstring' '--enable-pdo=shared' '--enable-sockets' '--with-libdir=lib' '--with-curl=/usr/kerberos/include' '--with-imap-ssl=/usr/kerberos' '--with-mcrypt=/usr/kerberos/include' '--with-mysql=/usr/kerberos' '--with-freetype-dir=/usr/kerberos' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-gd' '--with-openssl' '--with-pdo-mysql=shared' '--without-sqlite' '--with-sqlite3=shared' '--with-pdo-sqlite=shared' '--with-pear' '--with-litespeed'
 
Top