debian7.0 編譯安裝php7.0.1

安裝編譯器php

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

獲取php安裝包mysql

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

安裝dev包linux

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

進行編譯安裝sql

./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

編譯 安裝curl

make && make install

報錯處理ui

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
相關文章
相關標籤/搜索