debian7.0 编译安装php7.0.1

安装编译器

apt-get install build-essential autoconf automake libtool bison re2c

获取php安装包

wget https://downloads.php.net/~ab/php-7.0.13RC1.tar.gz

安装dev包

apt-get install libxml2-dev libssl-dev libbz2-dev libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libgmp-dev libgmp3-dev libmcrypt-dev libmysqlclient15-dev libpspell-dev librecode-dev

进行编译安装

./buildconf            //用来生成configure脚本
./configure \
 --prefix=/usr \
 --with-config-file-path=/etc \
 --enable-mbstring \
 --enable-zip \
 --enable-bcmath \
 --enable-pcntl \
 --enable-ftp \
 --enable-exif \
 --enable-calendar \
 --enable-sysvmsg \
 --enable-sysvsem \
 --enable-sysvshm \
 --enable-wddx \
 --with-curl \
 --with-mcrypt \
 --with-iconv \
 --with-gmp \
 --with-pspell \
 --with-gd \
 --with-jpeg-dir=/usr \
 --with-png-dir=/usr \
 --with-zlib-dir=/usr \
 --with-xpm-dir=/usr \
 --with-freetype-dir=/usr \
 --with-t1lib=/usr \
 --enable-gd-native-ttf \
 --enable-gd-jis-conv \
 --with-openssl \
 --with-pdo-mysql=/usr \
 --with-gettext=/usr \
 --with-zlib=/usr \
 --with-bz2=/usr \
 --with-recode=/usr \
 --with-mysqli=/usr/bin/mysql_config

编译 安装

make && make install

报错处理

Please reinstall the libcurl distribution
aptitude search libcurl4
aptitude install libcurl4-gnutls-dev
 Cannot find OpenSSL’
wget https://www.openssl.org/source/openssl-1.0.2j.tar.gz

tar -zxvf openssl-1.0.2j.tar.gz

cd openssl-1.0.2j

./config

make && make install
configure: error: Unable to locate gmp.h

sudo apt-get install libgmp-dev libgmp3-dev 
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
Can not find recode.h anywhere under /usr /usr/local /usr /opt.
apt-get install librecode-dev
Cannot find pspell
apt-get install libpspell-dev
Please reinstall the mysql distribution
apt-get install libmysqlclient15-dev
mcrypt.h not found. Please reinstall libmcrypt.
apt-get install libmcrypt-dev
xml2-config not found
apt-get install libxml2-dev
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值