摘要:起步服務(wù)器已后開(kāi)發(fā)環(huán)境,卻還是沒(méi)有不能順利編譯源碼,在此整理編譯過(guò)程。獲取源碼與編譯確保已安裝了,因?yàn)檫@可以看到每次修改的內(nèi)容及日志信息和跟進(jìn)作者的更新。
起步
服務(wù)器Ubuntu14.04已后lamp開(kāi)發(fā)環(huán)境,卻還是沒(méi)有不能順利編譯php源碼,在此整理編譯過(guò)程。
獲取源碼與編譯確保已安裝了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版本信息則說(shuō)明編譯成功。
錯(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
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://specialneedsforspecialkids.com/yun/21825.html
摘要:安裝在下很多功能都在這個(gè)軟件包中了,不在區(qū)分等軟件包了,因此我們可以直接安裝注意這邊的是為了方便安裝,加上它就不需要在進(jìn)行安裝確認(rèn),簡(jiǎn)單粗暴一鍵完成安裝的模塊在中的模塊有兩個(gè)軟件包,分別是和大多數(shù)情況下應(yīng)該使用第一個(gè)。 安裝Apache 在Ubunt14.04下很多功能都在apache2這個(gè)軟件包中了,不在區(qū)分mpm-work,mpm-prefork,mpm-event等軟件包了,因...
摘要:安裝在下很多功能都在這個(gè)軟件包中了,不在區(qū)分等軟件包了,因此我們可以直接安裝注意這邊的是為了方便安裝,加上它就不需要在進(jìn)行安裝確認(rèn),簡(jiǎn)單粗暴一鍵完成安裝的模塊在中的模塊有兩個(gè)軟件包,分別是和大多數(shù)情況下應(yīng)該使用第一個(gè)。 安裝Apache 在Ubunt14.04下很多功能都在apache2這個(gè)軟件包中了,不在區(qū)分mpm-work,mpm-prefork,mpm-event等軟件包了,因...
摘要:本文以當(dāng)前最新版本演示整個(gè)源碼安裝的流程。下載源碼包訪問(wèn)官網(wǎng)的源碼包下載地址。下載源碼有兩種方式服務(wù)器端使用命令直接下載。 本文以當(dāng)前最新版本 PHP 7.3.1 演示整個(gè)源碼安裝的流程。 下載 PHP 源碼包 訪問(wèn) PHP 官網(wǎng)的源碼包下載地址 http://php.net/downloads.php。 showImg(https://segmentfault.com/img/rem...
閱讀 3981·2021-11-22 15:31
閱讀 2518·2021-11-18 13:20
閱讀 3098·2021-11-15 11:37
閱讀 6959·2021-09-22 15:59
閱讀 736·2021-09-13 10:27
閱讀 3767·2021-09-09 09:33
閱讀 1435·2019-08-30 15:53
閱讀 2562·2019-08-29 15:37