PHP安装,报错信息和解决过程
admin
2023-06-27 18:03:28
0

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


报错一:configure: error: xml2-config not found. Please check your libxml2 installation.

    原因:缺少libxm文件

    解决方法:yum -y install libxml2*

【转载】重装mysql+apache+php,configure php的时候得到错误信息

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.
错误原因,xml2-config这个文件没找到。
/*原因可能出在我这次安装redhat,有很多东西没选上,所以出此问题。*/
根据错误提示,安装libxml2。RHEL_5.2的安装光盘上提供了很多rpm包,我的是dvd光盘,位置在/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 /*提示我已经安装过了*/
[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]#

好了,没有问题了,
make
make install
安装完成

报错二:configure: error: Cannot find OpenSSL's

    因为缺少openssl-dev 文件

    yum -y install openssl-dev

报错三:configure: error: Please reinstall the BZip2 distribution

    缺少安装bzip2或者bzip2-devel

    查看哪些软件已安装:rpm -qa,后接可指定查找的软件

    yum -y install bzip2-devel

报错四:configure: error: jpeglib.h not found.

    缺少libjpeg库文件

    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

报错五:onfigure: error: mcrypt.h not found. Please reinstall libmcrypt.

    libmcrypt库没有安装

    【转载】今天在编译php的时候,出现如下错误php安装出错:configure:  error: mcrypt.h not found. Please reinstall  libmcrypt.,意思是,没有查找到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

==========================================================

如果以上方法仍然不能安装,请参考:

rpm -ivh "http://www.lishiming.net/data/p_w_upload/forum/month_1211/epel-release-6-7.noarch.rpm
yum install -y libmcrypt-devel 
因为centos6.x 默认的yum源没有libmcrypt-devel 这个包,只能借助第三方yum源。

问题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选项是无效的,可以不予理会

    通过./configure --help |grep *gd-native*查看该选项意思


相关内容

热门资讯

模仿黄仁勋走红后,“我现在很害... 5月,英伟达CEO黄仁勋在华访问期间,身着他标志性的皮衣,一头扎入北京的“烟火气”之中。他在街头大口...
原创 北... 5月29日,北方华创宣布,其首台600mm×600mm面板级封装去胶设备(Descum)成功出厂,标...
燃气灶开关丢了怎么修复 燃气灶的开关是长期使用后容易出现丢失或损坏的情况。如果你的燃气灶开关丢了,该如何修复呢?下面提供几种...
成都阳光明珠家具怎么样 最佳回答 成都阳光明珠家具属于国内的二线家具品牌。在产品的质量以及销售量上是没有办法跟全友家私,宜家...
修理洗手盆脱落多少钱 修理洗手盆脱落的费用可能会因多种因素而有所不同,以下是一些可能影响价格的因素:1. 损坏程度:洗手盆...
湖北一地回应“农机手抢收夏粮收... 澎湃新闻记者 钟煜豪5月30日,湖北天门市汪场镇人民政府就网络反映的“广西农机手抢收夏粮收割机爬梯被...
洗衣机黑屏修理多少钱 洗衣机黑屏是一种常见的故障。造成这种问题的原因可能有很多,例如故障的电源线,中断的电源等等。 如果...
兴国上门维修燃气灶价格 现今社会,人们对家居生活的需求越来越高,因此家电维修服务行业也得到了蓬勃发展,尤其是燃气灶维修方面更...
供应商变股东:存储芯片三巨头联... 美光、三星、SK海力士历史上首次联合出现在同一家AI公司的融资名单。 当地时间5月28日,Anthr...
美防长:将扩充美在“印太”核潜... 澎湃新闻记者 南博一据央视新闻报道,当地时间30日,在香格里拉对话会第一次全体会议中,美国国防部长赫...