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*查看该选项意思


相关内容

热门资讯

空调连续工作多久需要停机休息 空调连续工作的时间取决于多个因素,包括空调的型号、功率、使用环境和维护情况等。一般来说,空调可以连续...
空调哪个符号是除湿的 空调除湿功能通常用一个水滴形状的符号表示。不同品牌和型号的空调遥控器可能会有所差异,但一般来说,除湿...
格力空调多长时间加一次氟利昂 1、一般情况下,空调对氟利昂的使用量是非常小的,所以在空调使用了四年左右的时候再考虑加也没问题。2、...
空调用多长时间需要加氟一次 一般情况下是五年。当出现以下这几种情况时,空调才需要加氟。1、空调的室内机和室外机各有两个接口,当接...
格调生活·C标思享荟:卡萨帝在... 9月12日的郑州龙湖金融岛,夜风轻拂,灯光璀璨。“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑...
品牌价值破千亿、高端份额持续领... 9月12日,“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑州站”在郑州龙湖金融岛举办。2026...
空调主板坏了修800还是换新的 空调主板坏了是修还是换新,需要考虑多个因素,以下是一些建议:1. 维修成本:如果维修费用较低,比如 ...
空调开多久需要休息多长时间 问题:空调开多久需要休息多长时间回答:1、在使用空调的过程中,一般空调开7~8个小时左右需要休息2~...
中央空调多长时间清洗一次 1、一般空调开机前清洗一次即可,空调开机中间时段再清洗一次,空调关机时清洗一次,这样比较合理。2、空...
中央空调氟利昂多久加一次 看空调制热和制冷程度,很多人的观点认为氟利昂必须一年放一次,其实这个观点是错误的,理解上面有点偏差,...