2016-11-25 2 views
2

PHP 7.0.13にmysqlnd拡張機能をインストールしようとすると、次のエラーが表示されます。PHP 7.0.13にmysqlndをインストールするとOpenSSLの<evp.h>が見つからない

私のopensslファイルは/usr/include/openssl/にあり、locate evp.hに従っています。

はすでにこれらを試してみました:まだトンを取得libssl-dev

  • https://github.com/mongodb/mongo-php-driver/issues/138
  • configure: error: Cannot find OpenSSL's <evp.h>
  • をインストール

    • --with-openssl=/usr/include/openssl/
    • --with-openssl-dir=/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 
      

      UPDATE

      多分これが関連している可能性がmysqlndconfigureファイルに問題があることを、記述bugs.php.netにan entryを発見しました。

    答えて

    0

    この(または同様の)問題を抱えている人には、phpbrewを使用してUbuntu 17.04にPHP 7.1をインストールしたことがあります。

    私は次のようにphpbrewを使用してのphp-7.1をインストールしようとした:

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

    phpbrew install 7.1 +default 
    

    これは、OpenSSLライブラリを見つけることができない報告を失敗し、いくつかのgithubの問題やフォーラムには、代わりに以下を使用することをお勧め

    元の質問とまったく同じエラーメッセージでも失敗する:

    Oが見つからないpenSSLの

    実際、このファイルは/ usr/local/opensslに存在しており、さらに奇妙なことがあります。 + OpenSSLは今を共有し、--with-opensslの-dirの前と同じパスを示すために使用されていると言う

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

    お知らせ:phpbrew問題111で提案されているように

    私は最後に解決策を見つけました/ usr/include/openssl

    関連する問題