您好,登錄后才能下訂單哦!
PHP安裝:
wget http://cn2.php.net/distributions/php-5.3.28.tar.gz
tar zxf php-5.3.28.tar.gz
cd php-5.3.28
./configure --prefix=/usr/local/php
--with-apxs2=/usr/local/apache2/bin/apxs
--with-
config-file-path=/usr/local/php/etc
--with-mysql=/usr/local/mysql --with-libxml-dir
--with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-
zlib-dir --with-bz2 --with-openssl
--with-mcrypt --enable-soap --enable-gd-native-ttf
--enable-mbstring --enable-sockets --enable-exif --disable-ipv6
make && make install
報(bào)錯(cuò)一:configure: error: xml2-config not found. Please check your libxml2 installation.
原因:缺少libxm文件
解決方法:yum -y install libxml2*
【轉(zhuǎn)載】重裝mysql+apache+php,configure php的時(shí)候得到錯(cuò)誤信息
shell#./configure --with-mysql=/usr/lib/mysql--with-apxs2=/usr/local/apache/bin/apxs
--prefix=/usr/local/php
configure: error: xml2-config not
found. Please check your libxml2 installation.
錯(cuò)誤原因,xml2-config這個(gè)文件沒(méi)找到。
/*原因可能出在我這次安裝redhat,有很多東西沒(méi)選上,所以出此問(wèn)題。*/
根據(jù)錯(cuò)誤提示,安裝libxml2。RHEL_5.2的安裝光盤(pán)上提供了很多rpm包,我的是dvd光盤(pán),位置在/media/RHEL_5.2
i386 DVD/Server,
cd /media/RHEL_5.2 i386 DVD/Server
ls *libxml*
[root@localhost Server]# ls *libxml*
libxml2-2.6.26-2.1.2.1.i386.rpm libxml2-python-2.6.26-2.1.2.1.i386.rpm
libxml2-devel-2.6.26-2.1.2.1.i386.rpm perl-libxml-perl-0.08-1.2.1.noarch.rpm
[root@localhost Server]# rpm -ivh
libxml2-python-2.6.26-2.1.2.1.i386.rpm
warning:
libxml2-python-2.6.26-2.1.2.1.i386.rpm: Header V3
DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package
libxml2-python-2.6.26-2.1.2.1 is already installed /*提示我已經(jīng)安裝過(guò)了*/
[root@localhost Server]# rpm -ivh
libxml2-devel-2.6.26-2.1.2.1.i386.rpm
warning:
libxml2-devel-2.6.26-2.1.2.1.i386.rpm: Header V3
DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
zlib-devel is needed by
libxml2-devel-2.6.26-2.1.2.1.i386
[root@localhost Server]# ls *zlib-devel*
zlib-devel-1.2.3-3.i386.rpm
[root@localhost Server]# rpm -ivh zlib-devel-1.2.3-3.i386.rpm
warning:
zlib-devel-1.2.3-3.i386.rpm: Header V3 DSA
signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:zlib-devel ########################################### [100%]
[root@localhost Server]# rpm -ivh
libxml2-devel-2.6.26-2.1.2.1.i386.rpm
warning:
libxml2-devel-2.6.26-2.1.2.1.i386.rpm: Header V3
DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libxml2-devel ########################################### [100%]
[root@localhost Server]#
好了,沒(méi)有問(wèn)題了,
make
make install
安裝完成
報(bào)錯(cuò)二:configure: error: Cannot find OpenSSL's <evp.h>
因?yàn)槿鄙賝penssl-dev 文件
yum -y install openssl-dev
報(bào)錯(cuò)三:configure: error: Please reinstall the BZip2 distribution
缺少安裝bzip2或者bzip2-devel
查看哪些軟件已安裝:rpm -qa,后接可指定查找的軟件
yum -y install bzip2-devel
報(bào)錯(cuò)四:configure: error: jpeglib.h not found.
缺少libjpeg庫(kù)文件
yum install libpng.x86_64 freetype.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y
yum install -y libjpeg.x86_64 libjpeg-devel.x86_64
報(bào)錯(cuò)五:onfigure: error: mcrypt.h not found. Please reinstall libmcrypt.
libmcrypt庫(kù)沒(méi)有安裝
【轉(zhuǎn)載】今天在編譯php的時(shí)候,出現(xiàn)如下錯(cuò)誤php安裝出錯(cuò):configure: error: mcrypt.h not found. Please reinstall libmcrypt.,意思是,沒(méi)有查找到mcrytp.h,需要安裝libcrytp,在下面的地址下載libmarypt:
wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/libmcrypt-2.5.7.tar.gz
安裝:
66 tar -zxvf libmcrypt-2.5.7.tar.gz
67 cd libmcrypt-2.5.7
68 mkdir -p /usr/local/libmcrytp
69 ./configure prefix=/usr/local/libmcrytp/
70 make
71 make install
==========================================================
如果以上方法仍然不能安裝,請(qǐng)參考:
rpm -ivh "http://www.lishiming.net/data/p_w_upload/forum/month_1211/epel-release-6-7.noarch.rpm"
yum install -y libmcrypt-devel
因?yàn)閏entos6.x 默認(rèn)的yum源沒(méi)有l(wèi)ibmcrypt-devel 這個(gè)包,只能借助第三方y(tǒng)um源。
問(wèn)題6:Thank you for using PHP.
Notice: Following unknown configure options were used:
--enable-gd-native-tff
Check './configure --help' for available options
原因PHP編譯完成,但是提示--enable-gd-native-tff選項(xiàng)是無(wú)效的,可以不予理會(huì)
通過(guò)./configure --help |grep *gd-native*查看該選項(xiàng)意思
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。