天天看點

php-configure錯誤解決

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: 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

yum -y install gd

yum -y install gd-devel

debian:apt-get install libjpeg-dev

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

yum install openssl openssl-devel

3) Configure: error: Please reinstall the BZip2 distribution

yum install bzip2 bzip2-devel

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

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

yum install libjpeg libjpeg-devel

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

yum install libpng libpng-devel

7) Configure: error: freetype.h not found.

yum install freetype-devel

 Configure: error: Unable to locate gmp.h

yum install gmp-devel

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

10) Configure: error: Please reinstall the ncurses distribution

yum install ncurses ncurses-devel

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

yum install unixODBC-devel

12) Configure: error: Cannot find pspell

yum install pspell-devel

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

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

# apt-get install libmcrypt-dev

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

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

yum -y install ncurses-devel (for redhat)

apt-get install libncurses5-dev(for debian)

17)configure: error: cannot find output from lex; giving up

18)configure: error: mod_deflate has been requested but can not be built due to prerequisite failures

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

本文摘自:http://wang01ning.blog.163.com/blog/static/860179020104443154501/

本文轉自奔跑在路上部落格51CTO部落格,原文連結http://blog.51cto.com/qiangsh/1563885如需轉載請自行聯系原作者

qianghong000