第一个问题:configure: error: libjpeg.(a|so) not found

很多人都纳闷儿了,我都安装了的,为什么就找不到呢?找不到其实就应试想到它的搜索位置里面是没有的,要不然才不会说not found

原因是我们大部分一些软件只要rpm -qa | grep ***

这时下面就有两个重复的的软件

[root@test php-5.2.13]# rpm -qa | grep jpeg
libjpeg-6b-33
libjpeg-6b-33
libjpeg-devel-6b-33

32位和64位的都装了。你可以强制删除两个包,再重装64位的包。

rpm --allmatches --nodeps

这种方法真是损系统又损你.有时候强制执行的东西也会随便把lib中的一些包给强制删了.所以我不建议这么做,重复就让它重复吧,没关系的!

要解决问题就是它没找到,我安装了的,那我得去找找看它到底是放那里去了.

[root@test php-5.2.13]# updatedb
[root@test php-5.2.13]# locate libjpeg.so
/usr/lib64/libjpeg.so.62
/usr/lib64/libjpeg.so.62.0.0
/usr/lib64/libjpeg.so
/usr/lib/libjpeg.so
[root@test php-5.2.13]# locate libjpeg.a
/usr/lib64/libjpeg.a
/data0/software/jpeg-6b/libjpeg.a
[root@test php-5.2.13]#

我们在编译的时候经常看到一个库的文件,一般就是以*.a,*.so等名字的,尝试的搜索搜索,不行就模糊搜索!

通过上面的搜索其实就知道一些原因了,configure一般的搜索编译路径为/usr/lib/下,因为php默认就在/usr/lib/下找相关库文件,而x64机器上是在:/usr/lib64.这时你就可以直接把需要的库文件从/usr/lib64中拷贝到/usr/lib/中去就可以了.

那么记得要在configure前执行如下的命令:

cp -frp /usr/lib64/libjpeg.* /usr/lib/

第二个问题:configure: error: libjpng.(a|so) not found

cp -frp /usr/lib64/libpng* /usr/lib/      //和上面方法一样

第三个问题:configure: error: Cannot find ldap libraries in /usr/lib.

cp -frp /usr/lib64/libldap* /usr/lib/     //和上面方法一样

另外附一些常见的configure错误列表供参考:

第一个    configure: error: No curses/termcap library found
解决方法:
redhat and centos运行:yum -y install ncurses-devel
debian and ubuntu运行: apt-get install libncurses5-dev

第二个    configure: error: xml2-config not found
yum -y install libxml2-devel
debian:apt-get install libxml2-dev

第三个    configure: error: Cannot find OpenSSL's
yum -y install openssl-devel

第四个     configure: error: libjpeg.(a|so) not found
yum -y install gd
yum -y install gd-devel
debian:apt-get install libjpeg-dev

第五个     configure: error: libpng.(a|so) not found.
apt-get install libpng12-dev

第六个     configure: error: cannot find output from lex; giving up
yum -y install flex

第七个     configure: error: mod_deflate has been requested but can not be   built due to prerequisite failures
yum -y install zlib-devel openssl-devel
debian:apt-get install zlib1g-dev

第八个     configure: error: libXpm.(a|so) not found.
apt-get install libxpm-dev

第九个     configure: error: freetype.h not found.
apt-get install libfreetype6-dev

第十个     configure: error: No recognized SSL/TLS toolkit detected
apt-get install libssl-dev

yum install libssl-dev

第十一个   Configure: error: xml2-config not found. Please check your libxml2 installation.

yum install libxml2 libxml2-devel (For Redhat & Fedora)

aptitude install libxml2-dev (For ubuntu)

第十二个   configure: error: Cannot find OpenSSL’s

yum install openssl openssl-devel

第十三个   Configure: error: Please reinstall the BZip2 distribution

yum install bzip2 bzip2-devel

第十四个   Configure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/

yum install curl curl-devel (For Redhat & Fedora)

install libcurl4-gnutls-dev (For Ubuntu)

第十五个   Configure: error: libjpeg.(also) not found.

yum -y install gd
yum -y install gd-devel
yum install libjpeg libjpeg-devel

第十六个   Configure: error: libpng.(also) not found.

yum install libpng libpng-devel
apt-get install libpng12-dev

第十七个   Configure: error: freetype.h not found.
yum install freetype-devel

第十八个   Configure: error: Unable to locate gmp.h

yum install gmp-devel

第十九个   Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!

解决方法:
yum install mysql-devel (For Redhat & Fedora)

apt-get install libmysql++-dev (For Ubuntu)

第二十个   Configure: error: Please reinstall the ncurses distribution

yum install ncurses ncurses-devel

第二十一个 Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!

方法 :
yum install unixODBC-devel

第二十二个 Configure: error: Cannot find pspell

yum install pspell-devel

第二十三个 configure: error: mcrypt.h not found. Please reinstall libmcrypt.

yum install libmcrypt libmcrypt-devel (For Redhat & Fedora)

apt-get install libmcrypt-dev

第二十四个 Configure: error: snmp.h not found. Check your SNMP installation.

yum install net-snmp net-snmp-devel

第二十五个 开启LDAP服务还需要
yum -y install openldap-devel openldap-servers openldap-clients

第二十六个 configure: error: No curses/termcap library found
yum -y install ncurses-devel (for redhat)
apt-get install libncurses5-dev(for debian)

第二十七个 configure: error: cannot find output from lex; giving up
yum -y install flex

第二十八个 configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
yum -y install zlib-devel openssl-devel
debian:apt-get install zlib1g-dev

第二十九个 configure: error: libXpm.(a|so) not found.
apt-get install libxpm-dev

yum install libXpm

linux安装php遇到的问题的更多相关文章

  1. 搜狗输入法linux安装 以及 12个依赖包下载链接分享

    搜狗输入法linux安装版,先安装各种依赖包,大概12个依赖,可能中途还需要其他依赖,可以效仿解决依赖问题.如图这12个文件要是手动点击下载,那也太笨点了,我们要用shell命令批量下载.命令如下:w ...

  2. linux安装php

    接上篇:linux安装apache 一.安装php 先安装libxml2库 [root@ctxsdhy package]# yum -y install libxml2-devel 最新地址在:htt ...

  3. linux安装oracle11g

    准备oracle安装文件 Oracle11gR2包含两个文件linux_11gR2_database_1of2.zip和linux_11gR2_database_2of2.zip,将这两个文件通过SS ...

  4. TODO:Linux安装PHP MongoDB驱动

    TODO:Linux安装PHP MongoDB驱动 PHP利于学习,使用广泛,主要适用于Web开发领域. MongoDB的主要目标是在键/值存储方式(提供了高性能和高度伸缩性)以及传统的RDBMS系统 ...

  5. Symantec Backup Exec 2010 Agent For Linux安装

    以前写过一篇文章介绍过Symantec Backup Exec 2012 Agent For Linux安装安装,今天介绍一下Symantec Backup Exec 2010 Agent For L ...

  6. Symantec Backup Exec 2012 Agent For Linux安装

    Backup Exec 2012 介绍 Backup Exec 2012 是一种为虚拟和物理环境提供保护的集成产品,能够简化备份和灾难恢复,并提供了无可匹敌的恢复功能.借助于强大的 Symantec ...

  7. linux 安装jdk

    1.Linux安装JDK步骤1. 先从网上下载jdk(jdk-1_5_0_02-linux-i586.rpm) ,推荐SUN的官方网站www.sun.com,下载后放在/home目录中,当然其它地方也 ...

  8. Hadoop Linux安装

    Hadoop Linux安装 步骤流程 1.硬件准备 2.软件准备(推荐CDH) 3.将Hadoop安装包分发到各个节点下 4.安装JDK 5.修改/etc/hosts配置文件 6.设置SSH免密码登 ...

  9. 自己瞎捣腾的Win7下Linux安装之路-----理论篇

    接着上回说道,我把双系统做好啦,开心.... 之后我就在想几个问题: 1.在Ubuntu装好后,重启电脑却还是win7,等我用EasyBCD之后,才可选择使用装好的Ubuntu呢? 2.在用EasyB ...

  10. Debian 7(Linux) 安装SSH使用SecureCRT连接配置

    1 Debian 安装 ssh2 首先确保你的Debian或者linux安装ssh并开启ssh服务 Debian和ubuntu的安装方法一样,只要源OK的话,可以直接安装 apt-get instal ...

随机推荐

  1. PhpStorm 4.0 & 5.0 部署本地Web应用

    1.创建新的项目(project),创建完成之后单击工具栏的应用运行/调试(Select Run/Debug Configuration)的下拉菜单弹出 Edit Cofigurations选项,单击 ...

  2. python-摩尔斯电码查询器

    主程序代码:morse_query.py #-*- coding: UTF-8 -*- ' __date__ = '2016/4/5' from Tkinter import * class mors ...

  3. *循环-01. 求整数段和【help】

    /* * Main.c * 循环-01. 求整数段和 * Created on: 2014年6月18日 * Author: Boomkeeper ***测试木有通过**** */ #include & ...

  4. [问题解决] /home目录占用率100%

    今天发现一个比较奇怪的现象,linux系统下一个目录挂在存储下,df -Th 显示该目录使用率100%, du 该目录显示只用了2%, 后来发现是由于进程占用了被删掉的文件空间导致.举例如下: [ro ...

  5. cdoj 791 Frozen Rose-Heads

    //本来想做白书上一题 结果发现又要二染色 又要dp的 想了两个小时没想通 然后做了个傻逼题安慰自己 解:不多说,就是递归到叶节点,然后回来的时候在解决子树和直接删边的代价中间取个最小值 #inclu ...

  6. centos安装qt开发环境

  7. NBA工资帽

    工资帽(Salary cap):在NBA,工资帽是最著名工资限制条款. 每年的"工资帽"是依据NBA前一年的总收入,然后取这个总收入的48%作为NBA球队工资总额. 再拿这48%的 ...

  8. js复制button在ie下的解决方式

    源代码例如以下: <input class="width200" maxlength="32" type="text" id=&quo ...

  9. node 的 异步 数据库 调用 处理

    相信很多人在使用node 的时候, 一方面会觉得他强大的异步性感到很方便. 但是有时候我们却非要程序能按我们自己的想法 去串行的执行我们的思路. 同样我在编写的过程中也遇到类似的问题,比如for 和 ...

  10. Application Loader下载安装和上传IOS app程序

    如果您安装了最新版的XCode开发环境.对于在4.2及以上版本,Developer/Applications/Utilities目录中已经有ApplicationLoader程序,无需执行以下单独安装 ...