搞了整整一天,好不容易折腾完,在此记录下,下次就省事了。
     去官网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 

ubuntu下编译安装mysql记录的更多相关文章

  1. ubuntu 下编译安装 mysql php nginx 及常见错误 (持续添加)

    mysql mysql 可以使用mysql 官方提供的apt源进行安装 参见这里 php 安装前先安装一些常见库 sudo apt-get install libpng16-16 libpng16-d ...

  2. 在Ubuntu下编译安装GreatSQL

    在Ubuntu下编译安装GreatSQL 本次介绍如何利用Docker构建Ubuntu环境,并将GreatSQL源码编译成二进制文件. 1.准备工作 先创建本次Docker的workdir为 /dat ...

  3. CentOS 下编译安装MySQL

    CnetOS 下编译安装 MySql 查看是否存在旧版本: rpm -qa | grep mysql 卸载旧版本: rpm -e mysql   #普通删除模式 rpm -e --nodeps mys ...

  4. Ubuntu下编译安装postgreSQL 10.5

    Ubuntu下编译安装postgreSQL 10.5 ubuntu 16.04 LTS系统postgreSQL 10.5 安装包准备 1.从PostgreSQL官网下载PostgreSQL的安装包 安 ...

  5. Linux下编译安装MySQL

    一.环境准备yum install -y ncurses-devel libaio-develyum install -y cmake makeuseradd -s /sbin/nologin -M ...

  6. Linux CentOS6.5下编译安装MySQL 5.6.16【给力详细教程】

    一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库 yum install gcc gcc-c++ ncurses-devel perl 安装cmake,从http://www.cmake ...

  7. CentOS下编译安装MySQL 5.6.21

    一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库 yum install gcc gcc-c++ ncurses-devel perl 安装cmake:http://www.cnblog ...

  8. Linux CentOS6.5下编译安装MySQL 5.6

    检查:卸载掉原有MySql 因为mysql数据库在Linux上实在是太流行了,所以目前下载的主流Linux系统版本基本上都集成了mysql数据库在里面,我们可以通过如下命令来查看我们的操作系统上是否已 ...

  9. ubuntu下编译安装poco

    系统环境: ubuntu版本:Linux jfcai-VirtualBox 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 ...

随机推荐

  1. oracle 实现 自增主键功能

    转自:https://blog.csdn.net/zxh2075/article/details/78488141 之前有一项工作是将mysql的数据库实现转移到oracle,遇到了自增主键实现的问题 ...

  2. excel2003, 2007最大行列、sheet数

    1.excel2003版本一个工作表最多可有65536行,行用数字1—65536表示;     256列,列用英文字母A—Z,AA—AZ,BA—BZ,……,IA—IV表示.2.一个工作簿中最多含有25 ...

  3. HBase 二级索引与Coprocessor协处理器

    Coprocessor简介 (1)实现目的 HBase无法轻易建立“二级索引”: 执行求和.计数.排序等操作比较困难,必须通过MapReduce/Spark实现,对于简单的统计或聚合计算时,可能会因为 ...

  4. ubuntu利用包管理器安装Node.JS

    步骤1:用curl获取源代码在我们用卷曲获取源代码之前,我们必须先升级操作系统,然后用卷发命令获取NodeSource添加到本地仓库. root@ubuntu-:~#apt-get update 安装 ...

  5. Entity Framework Code-First(11):Configure One-to-One

    Configure One-to-Zero-or-One Relationship: Here, we will configure One-to-Zero-or-One relationship b ...

  6. ZOJ 3946 Highway Project (最短路)

    题意:单源最短路,给你一些路,给你这些路的长度,给你修这些路的话费,求最短路和最小花费. 析:本质就是一个最短路,不过要维护两个值罢了,在维护花费时要维护的是该路要花多少,而不是总的路线花费. 代码如 ...

  7. bash字符串匹配

    #!/bin/shfoo(){    local basedir=$1    local all_entries=`ls -c`    for entry in $all_entries    do ...

  8. If,for,range混合使用笔记-(VBA视频教程2:使用IF进行逻辑判断)

    -- 新建表格:#单元格a1-a100全部等于1的代码 Sub test() Dim i As Integer For i = To Range( Next End Sub -- 新建表格:#单元格a ...

  9. cookie中存取中文字符

    1.存入中文: Cookie c = new Cookie("username", java.net.URLEncoder.encode(name,"utf-8" ...

  10. bzoj2597: [Wc2007]剪刀石头布(费用流)

    传送门 不得不说这思路真是太妙了 考虑能构成三元组很难,那我们考虑不能构成三元组的情况是怎么样 就是说一个三元组$(a,b,c)$,其中$a$赢两场,$b$赢一场,$c$没有赢 所以如果第$i$个人赢 ...