获取最新PHP代码
git clone https://git.php.net/repository/php-src.git
构建编译环境
apt-get install build-essential
编译:
./buildconf
报错autoconf not found,apt-get install autoconf
./configure –help
./configure –prefix=/tmp/ –disable-all //指定编译后的路径,关闭所有的扩展编译
报错configure: error: bison is required to build,==>apt-get install bison
报错configure: error: xml2-config not found.,==>apt-get install libxml2*
make
报错virtual memory exhausted: Cannot allocate memory,==>没有分配虚拟内存,swap
dd if=/dev/zero of=/swap bs=1024 count=1M
mkswap /swap
swapon /swap
echo “/swap swap swap sw 0 0” >> /etc/fstab
make install
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/industrynews/12585.html