PHP源碼編譯詳解

編譯php包:php-5.4.26.tar.bz2php

解壓php-5.4.26.tar.bz2後,進入php解壓目錄:mysql

./configure --prefix=/usr/local/php --enable-fpm --enable-debug --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --enable-mbstring --with-curl --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-config-file-path=/usr/local/php/etcsql

運行後遇到的問題:app

error 1curl

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

(看提示就明白 是一個lib庫沒裝  先用 yum search 名字 看是否能搜到名字 ,找到名字後 把軟件包 開發包裝上)url

解決辦法spa

yum install libxml2-devel.x86_64 -ydebug

error 2orm

checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h>

這是ssl沒裝

解決辦法

 yum  install  openssl-devel.x86_64 -y

error 3

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

這是bzip2軟件包沒有安裝

解決辦法

yum install bzip2-devel.x86_64 -y

error 4

configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/

curl和curl庫文件沒有安裝

解決辦法

yum install libcurl.x86_64 libcurl-devel.x86_64 -y

error 5

checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
configure: error: jpeglib.h not found

GD庫沒有安裝

解決辦法

yum install libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y

相關文章
相關標籤/搜索