linux安装php遇到的问题
第一个问题: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遇到的问题的更多相关文章
- 搜狗输入法linux安装 以及 12个依赖包下载链接分享
搜狗输入法linux安装版,先安装各种依赖包,大概12个依赖,可能中途还需要其他依赖,可以效仿解决依赖问题.如图这12个文件要是手动点击下载,那也太笨点了,我们要用shell命令批量下载.命令如下:w ...
- linux安装php
接上篇:linux安装apache 一.安装php 先安装libxml2库 [root@ctxsdhy package]# yum -y install libxml2-devel 最新地址在:htt ...
- linux安装oracle11g
准备oracle安装文件 Oracle11gR2包含两个文件linux_11gR2_database_1of2.zip和linux_11gR2_database_2of2.zip,将这两个文件通过SS ...
- TODO:Linux安装PHP MongoDB驱动
TODO:Linux安装PHP MongoDB驱动 PHP利于学习,使用广泛,主要适用于Web开发领域. MongoDB的主要目标是在键/值存储方式(提供了高性能和高度伸缩性)以及传统的RDBMS系统 ...
- Symantec Backup Exec 2010 Agent For Linux安装
以前写过一篇文章介绍过Symantec Backup Exec 2012 Agent For Linux安装安装,今天介绍一下Symantec Backup Exec 2010 Agent For L ...
- Symantec Backup Exec 2012 Agent For Linux安装
Backup Exec 2012 介绍 Backup Exec 2012 是一种为虚拟和物理环境提供保护的集成产品,能够简化备份和灾难恢复,并提供了无可匹敌的恢复功能.借助于强大的 Symantec ...
- linux 安装jdk
1.Linux安装JDK步骤1. 先从网上下载jdk(jdk-1_5_0_02-linux-i586.rpm) ,推荐SUN的官方网站www.sun.com,下载后放在/home目录中,当然其它地方也 ...
- Hadoop Linux安装
Hadoop Linux安装 步骤流程 1.硬件准备 2.软件准备(推荐CDH) 3.将Hadoop安装包分发到各个节点下 4.安装JDK 5.修改/etc/hosts配置文件 6.设置SSH免密码登 ...
- 自己瞎捣腾的Win7下Linux安装之路-----理论篇
接着上回说道,我把双系统做好啦,开心.... 之后我就在想几个问题: 1.在Ubuntu装好后,重启电脑却还是win7,等我用EasyBCD之后,才可选择使用装好的Ubuntu呢? 2.在用EasyB ...
- Debian 7(Linux) 安装SSH使用SecureCRT连接配置
1 Debian 安装 ssh2 首先确保你的Debian或者linux安装ssh并开启ssh服务 Debian和ubuntu的安装方法一样,只要源OK的话,可以直接安装 apt-get instal ...
随机推荐
- SharePreferences类的使用
简述:以key-value键值对的方式将数据保存到Android自身定义的文件夹(/data/data/<package name>/shared_prefs root才可见的文件夹)中 ...
- Android 使用PopupWindow实现弹出菜单
在本文当中,我将会与大家分享一个封装了PopupWindow实现弹出菜单的类,并说明它的实现与使用. 因对界面的需求,android原生的弹出菜单已不能满足我们的需求,自定义菜单成了我们的唯一选择,在 ...
- mysql中timestamp,datetime,int类型的区别与优劣
转载请注明来自 souldak,微博: @evagle 以下内容 整合筛选自互联网: int 1. 占用4个字节 2. 建立索引之后,查询速度快 3. 条件范围搜索可以使用使用between 4. 不 ...
- Centos6.5升级gcc for qt5.3.1
1.升级GCC CentOS6.5内置的GCC版本为4.4,而Qt5.2.1则需要4.8.2的支持(支持C++ 11特性),因此,必须先升级GCC wget http://ftp.tsukuba.wi ...
- Introducing Regular Expressions 学习笔记
Introducing Regular Expressions 读书笔记 工具: regexbuddy:http://download.csdn.net/tag/regexbuddy%E7%A0%B4 ...
- 【转】 LESS CSS 框架简介
简介 CSS(层叠样式表)是一门历史悠久的标记性语言,同 HTML 一道,被广泛应用于万维网(World Wide Web)中.HTML 主要负责文档结构的定义,CSS 负责文档表现形式或样式的定义. ...
- ssh框架的搭建
SSH 为 struts+spring+hibernate的一个集成框架,是目前较流行的一种Web应用程序开源框架. 集成SSH框架的系统从职责上分为四层:表示层.业务逻辑层.数据持久层和域模块层,以 ...
- Constructor JavaScript构造器模式。
构造器模式 : Constructor模式中, 通过在构造器前面加 new 关键字, 告诉JavaScript 像使用构造器一样实例化一个新对象,并且对象成员由该函数定义. 构造器内, 使用this ...
- PHP获取中文汉字首字母方法
function getFirstLetter($str){ $fchar = ord($str{0}); if($fchar >= ord("A") and $fchar ...
- 实现php获取mp3文件元信息如播放时间歌曲作者等
最近收集到一个php获取mp3文件元信息的类,感觉比较方便.现在分享给大家! 下面是使用方式和测试方式: <?php include_once 'mp3file.class.php'; func ...