ubuntu mysql 编译_ubuntu下编译安装mysql记录

搞了整整一天,好不容易折腾完,在此记录下,下次就省事了。

去官网http://www.php.net/downloads.php下载所需要的php版本,这里我选择5.6.22。

下载:

wget http://cn2.php.net/distributions/php-5.6.22.tar.gz

解压:

tar -zxvf  php-5.6.22.tar.gz && cd php-5.6.22

configure脚本:

/configure  --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-gd --with-openssl --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir --enable-xml --enable-sockets --with-apxs2=/usr/bin/apxs2 --with-mcrypt --with-curl --with-mhash --with-bz2 --enable-ftp --enable-shared --enable-shmop --enable-sysvsem --enable-bcmath --enable-fpm --enable-maintainer-zts --enable-gd-native-ttf --with-mysql=/usr --with-config-file-path=/etc/php5/apache2 --with-config-file-scan-dir=/etc/php5/conf.d --with-openssl=/usr

编译安装:

make && make install

期间如果遇到错误:

出现得错误如下:

错误一:

configure: error: xml2-config not found. Please check your libxml2 installation.

而我已经安装过了libxml2,但是还是有这个提示:

解决办法:

# sudo apt-get install libxml2-dev

错误二:

configure: error: Please reinstall the BZip2 distribution

而我也已经安装了bzip2,网上找到得解决方案都是需要安装bzip2-dev,可是11.10里面没有这个库。

解决办法:在网上找到bzip2-1.0.5.tar.gz,解压,直接make ,sudo make install.(我使用的该源来自于http://ishare.iask.sina.com.cn/f/9769001.html)

错误三:

configure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/

解决办法:

# sudo apt-get install libcurl4-gnutls-dev

错误四:

configure: error: jpeglib.h not found.

解决办法:

# sudo apt-get install libjpeg-dev

错误五:

configure: error: png.h not found.

解决办法:

# sudo apt-get install libpng-dev

错误六:

configure: error: libXpm.(a|so) not found.

解决办法:

# sudo apt-get install libxpm-dev

错误七:

configure: error: freetype.h not found.

解决办法:

# sudo apt-get install libfreetype6-dev

错误八:

configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.

解决办法:

# sudo apt-get install libt1-dev

错误九:

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

解决办法:

# sudo apt-get install libmcrypt-dev

错误十:

configure: error: Cannot find MySQL header files under yes.

Note that the MySQL client library is not bundled anymore!

解决办法:

# sudo apt-get install libmysql++-dev

错误十一:

configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

解决办法:

# sudo apt-get install libxslt1-dev

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值