[英]PHPBrew - various problems with installation
我正在嘗試使用PHPBrew安裝PHP 5.4,但出現以下錯誤:
-> % phpbrew install 5.4.6 +default +apxs2 +mysql
===> phpbrew will now build 5.4.6
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: c9aa0f4996d1b91ee9e45afcfaeb5d2e
===> Distribution file was successfully extracted, skipping...
Found existing Makefile, running make clean to ensure everything will be rebuilt.
You can append --no-clean option after the install command if you don't want to rebuild.
===> Running make clean: /usr/bin/make -C '/home/breq/.phpbrew/build/php-5.4.6' --quiet 'clean'
===> Checking patches...
Checking patch for replace apache php module name with custom version name
0 changes patched.
Found existing build.log, renaming it to /home/breq/.phpbrew/build/php-5.4.6/build.log.1466515643
===> Configuring 5.4.6...
Use tail command to see what's going on:
$ tail -F /home/breq/.phpbrew/build/php-5.4.6/build.log
===> Checking patches...
Checking patch for php5.3.29 multi-sapi patch.
Checking patch for php5.3.x on 64bit machine when intl is enabled.
Checking patch for openssl dso linking patch
===> Building...
Error: Make failed:
The last 5 lines in the log file:
/home/breq/.phpbrew/build/php-5.4.6/ext/openssl/xp_ssl.c:355: undefined reference to `SSLv3_server_method'
/home/breq/.phpbrew/build/php-5.4.6/ext/openssl/xp_ssl.c:343: undefined reference to `SSLv3_client_method'
collect2: error: ld returned 1 exit status
Makefile:244: recipe for target 'sapi/cli/php' failed
make: *** [sapi/cli/php] Error 1
Please checkout the build log file for more details:
tail /home/breq/.phpbrew/build/php-5.4.6/build.log
使用+openssl
-> % phpbrew install 5.4.6 +default +apxs2 +mysql +openssl=/usr/include/openssl
===> phpbrew will now build 5.4.6
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: c9aa0f4996d1b91ee9e45afcfaeb5d2e
===> Distribution file was successfully extracted, skipping...
Found existing Makefile, running make clean to ensure everything will be rebuilt.
You can append --no-clean option after the install command if you don't want to rebuild.
===> Running make clean: /usr/bin/make -C '/home/breq/.phpbrew/build/php-5.4.6' --quiet 'clean'
===> Checking patches...
Checking patch for replace apache php module name with custom version name
0 changes patched.
Found existing build.log, renaming it to /home/breq/.phpbrew/build/php-5.4.6/build.log.1466516015
===> Configuring 5.4.6...
Use tail command to see what's going on:
$ tail -F /home/breq/.phpbrew/build/php-5.4.6/build.log
Error: Configure failed:
The last 5 lines in the log file:
checking for Kerberos support... no
checking for DSA_get_default_method in -lssl... no
checking for X509_free in -lcrypto... yes
checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h>
Please checkout the build log file for more details:
tail /home/breq/.phpbrew/build/php-5.4.6/build.log
我的操作系統: Xubuntu 16.10
+ PHP 7.07
-> % tail /home/lmalicki/.phpbrew/build/php-5.4.6/build.log
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /usr
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking for DSA_get_default_method in -lssl... no
checking for X509_free in -lcrypto... yes
checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h>
我好像您缺少一些依賴項。
首先嘗試安裝ssl dev軟件包:
apt-get install libssl-dev
PHPBrew只是下載並編譯php,但未在您的OS中安裝必需的依賴項。
編輯:
我剛剛注意到,您在+openssl=/usr/include/openssl
提供了openssl庫的路徑。
您確定它在那里嗎? 您可以使用which openssl
檢查它。 此命令將返回openssl二進制文件的路徑。
另外,您可能會嘗試簡單地刪除路徑,因為PHPBrew應該自己找到合適的二進制文件。
由於+ openssl指令實際上提供的是前綴而不是包含路徑,請嘗試
+openssl=/usr -- --with-libdir=lib64
configure: error: Cannot find OpenSSL's <evp.h>
如果您安裝了更新版本的OpenSSL,然后提供了您的發行版,則可能會發生此問題。
如果您使用ubuntu,則可能需要將軟件包降級。 (但您可能出於某種原因安裝了其他版本,因此請在此處小心)
#file etc/apt/preferences.d/allow-downgrade
Package: *
Pin: release o=Ubuntu
Pin-Priority: 1001
然后
sudo apt-get update
sudo apt-get upgrade
和選項
-- --with-openssl=/path/to/libs
要么
+openssl
應該工作正常。
如果您已經從PHPbrew安裝了一些功能異常的PHP,請不要忘記使用
phpbrew switch recently_installed_php_ver_number_here
在Ubuntu 16.10上
sudo apt-get install libssl-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install clibcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev
然后重新運行
phpbrew install 5.4.6 +default +apxs2 +mysql +openssl=/usr/include/openssl
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.