php-configure错误解决

摘要:
您可以强制删除两个软件包并重新安装64位软件包。

configure: error: libjpeg.(a|so) not found
configure: error: libjpeg.(a|so) not found
ln -sf libjpeg.so.62.0.0 libjpeg.so


configure: error: libpng.(a|so) not found.
yum install libpng-devel

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

可能在config结束后会提示:

configure: error: libjpeg.(a|so) not found
configure: error: libjpng.(a|so) not found

错误,那么请在configure前执行如下的命令:

cp -frp /usr/lib64/libjpeg.* /usr/lib/
cp -frp /usr/lib64/libpng* /usr/lib/
因为php默认就在/usr/lib/下找相关库文件,而x64机器上是在:/usr/lib64

解决这个问题,首先确定你安装的 jpeg的x86_64的的安装位置
shell> updatedb
shell> locate libjpeg.so
看到已经安装位置


然后明白php参数的含义
根据php的配置参数
--with-jpeg-dir=/usr --with-libdir=lib64  
--with-jpeg-dir=/usr :是确定jpeg的安装位置
--with-libdir=lib64 : 这个是一个全局参数,代表配置器寻找所有安装路径下的lib64目录,而不是默认安装路径下的lib目录

CentOS 5 常见的configure error的解决方法2009-10-20 10:23仅限于CentOS 5
configure: error: No curses/termcap library found
网上有的说法是:
--with-named-curses-libs=/usr/lib/libncursesw.so.5
其实是不对的,虽然能解决configure的错误,但是make的时候会提示错误,正确的做法应该是
yum -y install ncurses-devel
debian: 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

onfigure: error: freetype.h not found.
apt-get install libfreetype6-dev

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

在x64的机器上编译PHP+GD的时候需要注意一下
Written by bixuan on 2007年04月12号 – 11:04


php编译常见错误大全Posted in linux相关 | 七月 22nd, 2009
1) Configure: error: xml2-config not found. Please check your libxml2 installation.

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

# aptitude install libxml2-dev (For ubuntu)

2) Checking for pkg-config… /usr/bin/pkg-config
configure: error: Cannot find OpenSSL’s

Solutions :

yum install openssl openssl-devel

3) Configure: error: Please reinstall the BZip2 distribution

Solutions :
yum install bzip2 bzip2-devel

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

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

# install libcurl4-gnutls-dev (For Ubuntu)

5) Configure: error: libjpeg.(also) not found.

Solutions :
yum -y install gd
yum -y install gd-devel
yum install libjpeg libjpeg-devel

6) Configure: error: libpng.(also) not found.

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

7) Configure: error: freetype.h not found.
Solutions :
yum install freetype-devel

 Configure: error: Unable to locate gmp.h

Solutions :
yum install gmp-devel

9) Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!

Solutions :
yum install mysql-devel (For Redhat & Fedora)

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

10) Configure: error: Please reinstall the ncurses distribution

Solutions :
yum install ncurses ncurses-devel

11) Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!

Solutions :
yum install unixODBC-devel

12) Configure: error: Cannot find pspell

Solutions :
yum install pspell-devel

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

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

# apt-get install libmcrypt-dev

14) Configure: error: snmp.h not found. Check your SNMP installation.

Solutions :

yum install net-snmp net-snmp-devel

15)开启LDAP服务还需要
yum -y install openldap-devel openldap-servers openldap-clients

16)configure: error: No curses/termcap library found
网上有的说法是:
–with-named-curses-libs=/usr/lib/libncursesw.so.5
其实是不对的,虽然能解决configure的错误,但是make的时候会提示错误,正确的做法应该是
yum -y install ncurses-devel (for redhat)
apt-get install libncurses5-dev(for debian)

17)configure: error: cannot find output from lex; giving up
yum -y install flex

18)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

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

补充:通过以上命令配置PHP时,遇到错误,总说找不到libmcrypt。由于这服务器是个裸机,很多必须的库都没装,必须一个一个的手动安装,可libmcrypt这个库我的确装过了。重试n遍,无解,解决方案

Then I visited
http://mcrypt.hellug.gr/mcrypt/index.html
an learned that I have to install not only libmcrypt
but also mcrypt and libmhash.
Here is the to do:
libmcrytp:
———–
download libmcrypt-xxx.tar.gz
create the following directory: / usr / local / libmcrypt
copy the libmcrypt-xxx.tar.gz into that directory and move to it
run the following shell (>) commands: (’xxx’ is the version number)
> gunzip -c libmcrypt-xxx.tar.gz | tar xf -
> cd libmcrypt-xxx
> ./configure --disable-posix-threads
> make
> make check (note: ‘make check’ is optional)
> make install
then (update your environment) add in / etc / profile the following path:
/usr/local/libmcrypt/libmcrypt-xxxx
(note: as I run Red Hat 7.3 I set the line a f t e r the if-part
(id -u = 0 …) with: pathmunge /usr/local / libm….)
and add in / etc / ld.so.conf the following path: /usr/local/lib
then run ldconfig:
> ldconfig
now comes the important part:
> cd /usr/local/libmcrypt/libmcrypt-xxx/libltdl
> ./configure --enable-ltdl-install
> make
> make install
(maybe not needed: I also added a link in / usr / bin: )
(> cd /usr/bin)
(> ln -s /usr/lib/libltdl.so.3.1.0 ltdl)
mhash:
———–
download mhash-xxx.tar.gz
create the following directory: / usr / local / mhash
copy the mhash-xxx.tar.gz into that directory and move to it
run the following shell (>) commands: (’xxx’ is the version number)
> gunzip -c mhash-xxx.tar.gz | tar xf -
> cd mhash-xxx
> ./configure
> make
> make check (note: ‘make check’ is optional)
> make install
mcrypt:
———–
download mcrypt-xxx.tar.gz
create the following directory: / usr / local / mcrypt
copy the mcrypt-xxx.tar.gz into that directory and move to it
run the following shell (>) commands: (’xxx’ is the version number)
> gunzip -c mcrypt-xxx.tar.gz | tar xf -
> cd mhash-xxx
> ./configure
> make
> make check (note: ‘make check’ is optional)
> make install
back to PHP:
————–
move into your PHP installation directory
then the following command worked on my computer:
>
./configure –with-apache=/usr/local/apache/apache_1.3.29 –with-mysql –wit
h-mcrypt=/usr/local/mcrypt/mcrypt-2.6.4
> make
> make install

免责声明:文章转载自《php-configure错误解决》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇tnsping 命令解析第三节:Vue3向下兼容2(v-for、数组方法、v-model、计算属性、监听器)下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

多路径下使用ASMLIB创建ASM磁盘

多路径下使用ASMLIB创建ASM磁盘 Asmlib有扫描磁盘有默认的顺序,通常为/dev/sd*,而多路径配置磁盘目录往往映射在/dev/mapper下 因此 #  egrep -v "^#" /etc/sysconfig/oracleasm ORACLEASM_ENABLED=true ORACLEASM_UID=grid ORACLEASM_GID...

dd命令详解

【基本参数详解】 dd 复制    if 源 if=/dev/zero不产生IO of 目的 of=/dev/null不产生IO bs 块大小    count 读写块的数量    iflag/oflag dd做读写测试时,要加两个参数 iflag=nocache 和 oflag=direct 参数。 没有的话dd有...

ubuntu磁盘分配和挂载

Linux(ubuntu)可以把分区作为挂载点,常用的几个挂载点、作用及一般应该分配的磁盘空间如下表所示:Markdown Extra 表格语法: 挂载点(目录) 建议大小 格式 作用 / 20G左右 ext4 根目录 /home 越大越好 ext4 用户工作目录,用户存储的数据,文件,安装的软件都存放在这儿 /boot 300M左右 e...

树莓派与Arduino串口通信

咳,时隔多月又回到了熟悉的博客园。 从现在开始重新去培养写博客的习惯。 主要是用于科研技术方面的,去记录一些我的学习和思考。 会把问题尽量的具体化,新手化 一是记录方便回忆,二是梳理,三也是希望为遇到相关问题的朋友提供多多少少的借鉴和帮助吧 回归正题,如何实现树莓派与Arduino串口通信 首先是接线方式 一、树莓派与arduino通过USB进行通信 1、...

故障处理:磁盘扩容出错:e2fsck: Bad magic number in super-block while trying to open /dev/vdb1

按照阿里云官网教程对云服务器进行磁盘扩容,使用fdisk重新分区,最后使用e2fsck和resize2fs来完成文件系统层面的扩容 在执行“e2fsck -f /dev/vdb1”命令时报错,如果你的问题和下面的错误一样,可以接着往下看: [root@aliyunsrv ~]# e2fsck -f /dev/vdb1 e2fsck 1.41.12 (17...

linux性能评估-内存案例实战篇

1.内存泄漏,该如何定位和处理 2.内存中的Buffer 和 Cache 在不同场景下的使用情况 场景 1:磁盘和文件写案例 场景 2:磁盘和文件读案例 1.内存泄漏,该如何定位和处理 机器配置:2 CPU,4GB 内存 预先安装 sysstat、Docker 以及 bcc 软件包,比如: # install sysstat docker s...