kaywang 发表于 2018-12-24 10:09:41

安装php遇到一些常见问题

  今天用centos6.5 安装PHP,遇到了一些问题;之前在另外一个版本安装都很顺利,我怀疑系统版本有问题;

  #./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/ --enable-soap --with-gd --enable-sockets --enable-mbstring --disable-ipv6 --enable-exif --with-zlib --with-curl -with-curlwrappers --enable-calendar --with-gettext --enable-gd-native-ttf --enable-zend-multibyte --with-bz2--with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-libxml-dir

  

  

  ...............
  第一遍

  checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
  

  解决方法

  #yum -y install libxml2-devel
  

  ........................................

  checking for BZip2 in default path... not found
configure: error: Please reinstall the BZip2 distribution
  

  解决方法

  # yum install bzip2 bzip2-devel
  

  ............
  checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in /include/curl/

  

  

  # yum install curl curl-devel
  

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

  解决方法

  # yum install libjpeg-devel
  # ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so
  

  

  

  

  ...................
  checking for jpeg_read_header in -ljpeg... yes
configure: error: libpng.(a|so) not found.

  

  

  # locate libpng.so
/usr/lib64/libpng.so.3
/usr/lib64/libpng.so.3.49.0
/usr/lib64/compiz/libpng.so
# rpm -q libpng
libpng-1.2.49-1.el6_2.x86_64
# rpm -q libpng-devel
package libpng-devel is not installed

  

  

  # yum install libpng-devel

  

  # updatedb
# locate libpng.so
/usr/lib64/libpng.so
/usr/lib64/libpng.so.3
/usr/lib64/libpng.so.3.49.0
/usr/lib64/compiz/libpng.so

  

  # ln -s /usr/lib64/libpng.so /usr/lib/libpng.so
  

  .......................
  configure: error: freetype.h not found.
  

  # yum install freetype-devel

  

  

  




页: [1]
查看完整版本: 安装php遇到一些常见问题