簡體   English   中英

找不到 OpenSSL 的<evp.h>在 PHP 7.0.13 上安裝 mysqlnd 時

[英]Cannot find OpenSSL's <evp.h> when installing mysqlnd on PHP 7.0.13

嘗試在 PHP 7.0.13 上安裝 mysqlnd 擴展時出現以下錯誤。

根據locate evp.h ,我的openssl文件位於/usr/include/openssl/上。

已經嘗試過這些:

仍然得到同樣的錯誤。

./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /root/.phpbrew/php/php-7.0.13
checking for PHP includes... -I/root/.phpbrew/php/php-7.0.13/include/php -I/root/.phpbrew/php/php-7.0.13/include/php/main -I/root/.phpbrew/php/php-7.0.13/include/php/TSRM -I/root/.phpbrew/php/php-7.0.13/include/php/Zend -I/root/.phpbrew/php/php-7.0.13/include/php/ext -I/root/.phpbrew/php/php-7.0.13/include/php/ext/date/lib
checking for PHP extension directory... /root/.phpbrew/php/php-7.0.13/lib/php/extensions/no-debug-non-zts-20151012
checking for PHP installed headers prefix... /root/.phpbrew/php/php-7.0.13/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable mysqlnd... yes, shared
checking whether to disable compressed protocol support in mysqlnd... yes
checking for the location of libz... 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

更新

在 bugs.php.net 上找到了一個條目,描述了mysqlndconfigure文件的問題,也許這可能是相關的。

對於遇到此(或類似)問題的任何人,這里是我使用phpbrew在 Ubuntu 17.04 上安裝 PHP 7.1 的一些發現。

我嘗試使用 phpbrew 安裝 php-7.1,如下所示:

phpbrew install 7.1 +default

這會導致無法找到 Openssl 庫的報告失敗,一些 github 問題和論壇建議改用以下內容:

phpbrew install 7.1 +default +mysql +openssl=/usr/local/openssl/

這也與原始問題完全相同的錯誤消息失敗:

找不到 OpenSSL 的 <evp.h>

事實上,該文件可以在 /usr/local/openssl 中找到,這使得情況更加奇怪。

我終於找到了 phpbrew issue 111中建議的解決方案:

 phpbrew install 7.1 +default +openssl=shared -- --with-openssl-dir=/usr/include/openssl

請注意,+openssl 現在表示共享,而 --with-openssl-dir 用於指示與之前相同的路徑/usr/include/openssl

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM