简体   繁体   中英

./configure can't find evp.h

I've installed the following packages on my Debian 6.0, after setting my versions in the sources.list to 7.0:

  • libssl-dev
  • openssl
  • openssl-common

I've verified that /usr/include/openssl/evp.h exists with a permission of 777, and then I've ran ./configure like this:

./configure --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-mcrypt --disable-rpath --enable-inline-optimization --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --enable-gd-native-ttf --with-fpm-user=www-data --with-fpm-group=www-data --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --enable-opcache --with-apxs2=/usr/bin/apxs2 --with-config-file-path=/etc/php5/apache2 --with-config-file-scan-dir=/etc/php5/conf.d --with-openssl-dir=/usr/include/openssl

However, I still get an error from configure that evp.h could not be found.

I was struggling with this problem for a long time, and this ended up working for me:

Instead of --with-openssl-dir=/usr/include/openssl just use --with-openssl

If ./configure ... can not find /usr/include/openssl/evp.h it is most likely you have not installed openssl, namely the header. So if you are using CentOs you should first do:

yum install openssl-devel

It's a bug in php bug

The cause of this is because after running the command 'phpize' the configure script has a variable (PHP_OPENSSL_DIR) that is not set "yes"

So you should do:

export PHP_OPENSSL_DIR=yes
./configure -with-openssl-dir=/usr/include/openssl

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM