溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

編譯php源碼錯(cuò)誤有哪些

發(fā)布時(shí)間:2021-03-29 08:57:46 來源:億速云 閱讀:190 作者:小新 欄目:編程語言

這篇文章將為大家詳細(xì)講解有關(guān)編譯php源碼錯(cuò)誤有哪些,小編覺得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。

編譯php源碼錯(cuò)誤集與解決

起步

服務(wù)器Ubuntu14.04已后lamp開發(fā)環(huán)境,卻還是沒有不能順利編譯php源碼,在此整理編譯過程。

獲取源碼與編譯

確保已安裝了gitsudo apt-get install git -y,因?yàn)檫@可以看到PHP每次修改的內(nèi)容及日志信息和跟進(jìn)作者的更新。

git clone https://github.com/php/php-src.git
cd php-src
sudo apt-get install build-essential
./buildconf
./configure --disable-all # 為了盡快得到可以測(cè)試的環(huán)境,我們僅編譯一個(gè)最精簡(jiǎn)的PHP
make
./sapi/cli/php -v

-v參數(shù)表示輸出版本號(hào),如果命令執(zhí)行完后看到輸出php版本信息則說明編譯成功。

編譯php源碼錯(cuò)誤有哪些

錯(cuò)誤集

錯(cuò)誤

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

解決
apt-get install libxml2-dev

錯(cuò)誤

/usr/bin/mysql_config: No such file or directory

解決
apt-get install mysql-server mysql-client libmysqlclient-dev

錯(cuò)誤

Warning: Declaration of PEAR_Installer::download() should be compatible with & PEAR_Downloader::download($params) in phar:///root/php7/php-src/pear/install-pear-nozlib.phar/PEAR/Installer.php on line 43

Warning: Declaration of PEAR_PackageFile_Parser_v2::parse() should be compatible with PEAR_XMLParser::parse($data) in phar:///root/php7/php-src/pear/install-pear-nozlib.phar/PEAR/PackageFile/Parser/v2.php on line 113
[PEAR] Archive_Tar - installed: 1.3.13
[PEAR] Console_Getopt - installed: 1.3.1
[PEAR] Structures_Graph- installed: 1.0.4

Warning: Declaration of PEAR_Task_Replace::init() should be compatible with PEAR_Task_Common::init($xml, $fileAttributes, $lastVersion) in phar:///root/php7/php-src/pear/install-pear-nozlib.phar/PEAR/Task/Replace.php on line 31
[PEAR] XML_Util - installed: 1.2.3

Warning: Declaration of PEAR_Task_Windowseol::init() should be compatible with PEAR_Task_Common::init($xml, $fileAttributes, $lastVersion) in phar:///root/php7/php-src/pear/install-pear-nozlib.phar/PEAR/Task/Windowseol.php on line 76

Warning: Declaration of PEAR_Task_Unixeol::init() should be compatible with PEAR_Task_Common::init($xml, $fileAttributes, $lastVersion) in phar:///root/php7/php-src/pear/install-pear-nozlib.phar/PEAR/Task/Unixeol.php on line 76
[PEAR] PEAR - installed: 1.9.5
Wrote PEAR system config file at: /root/php7/usr/etc/pear.conf

解決
`You may want to add: /root/php7/usr/lib/php to your php.ini include_path
/root/php7/php-src/build/shtool install -c ext/phar/phar.phar /root/php7/usr/bin`

錯(cuò)誤

configure: WARNING: unrecognized options: --with-mysql

錯(cuò)誤

checking for bison version... invalid
configure: WARNING: This bison version is not supported for regeneration of the Zend/PHP parsers (found: none, min: 204, excluded: ).
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
configure: error: bison is required to build PHP/Zend when building a GIT checkout!

解決
apt-get install bison

錯(cuò)誤

configure: error: Cannot find OpenSSL's

解決
apt-get install libssl-dev

錯(cuò)誤

configure: error: Cannot find OpenSSL's libraries

解決
apt-get install libssl-dev

錯(cuò)誤

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

解決
apt-get install libbz2-dev

錯(cuò)誤

configure: error: Please reinstall the libcurl distribution –
easy.h should be in /include/curl/

解決
apt-get install libcurl4-openssl-dev

錯(cuò)誤

If configure fails try --with-vpx-dir=
configure: error: jpeglib.h not found.

解決
apt-get install libjpeg-dev

錯(cuò)誤

configure: error: png.h not found.

解決
apt-get install libpng12-dev

錯(cuò)誤

configure: error: freetype-config not found.

解決
apt-get install libfreetype6-dev

錯(cuò)誤

configure: error: mcrypt.h not found. Please reinstall libmcrypt.

解決
apt-get install libmcrypt-dev

錯(cuò)誤

configure: error: Cannot find pspell

解決
apt-get install libpspell-dev

錯(cuò)誤

PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.

解決
pear install pear/PHP_Archive

錯(cuò)誤

checking for recode support... yes
configure: error: Can not find recode.h anywhere under /usr /usr/local /usr /opt.

解決
apt-get install librecode-dev

關(guān)于“編譯php源碼錯(cuò)誤有哪些”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺得文章不錯(cuò),請(qǐng)把它分享出去讓更多的人看到。

向AI問一下細(xì)節(jié)

免責(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)容。

php
AI