【问题标题】:./configure can't find evp.h./configure 找不到 evp.h
【发布时间】:2014-06-04 13:19:57
【问题描述】:

在将 sources.list 中的版本设置为 7.0 后,我在 Debian 6.0 上安装了以下软件包:

  • libssl 开发
  • openssl
  • openssl-common

我已经验证 /usr/include/openssl/evp.h 存在且权限为 777,然后我运行 ./configure 如下:

./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

但是,我仍然从 configure 中得到一个错误,即找不到 evp.h。

【问题讨论】:

  • 不,我在CentOSremi-php55 存储库中使用了yum。您可以使用Debianondrej 存储库并摆脱麻烦。
  • 我也有这个确切的错误。非常感谢任何帮助。
  • @RandomSeed 所有测试用例都因链接建议而失败

标签: php linux debian


【解决方案1】:

我在这个问题上苦苦挣扎了很长时间,结果这对我有用:

不要使用--with-openssl-dir=/usr/include/openssl,而是使用--with-openssl

【讨论】:

  • 在我的情况下(7.1.0RC3),--with-openssl 不是配置。但是, --with-openssl-dir 确实解决了我的问题。非常感谢:D
  • 如果您检查命令./configure --help,您将看到这一行:--with-openssl-dir=DIR SNMP: openssl install prefix。仅与 SNMP 有关。
  • 感谢您添加此答案。它帮助了我,这仍然是相关的。我在 Debian 9(2019 年 5 月)上构建 PHP 7.3.5!
  • 帮助我在 ubuntu 18.04 上从源代码安装 PHP 7.1.3
【解决方案2】:

如果./configure ...找不到/usr/include/openssl/evp.h很有可能你没有安装openssl,也就是header。所以如果你使用 CentOs 你应该先做:

yum install openssl-devel

【讨论】:

    【解决方案3】:

    这是php bug中的一个错误

    这是因为在运行命令 'phpize' 后,配置脚本有一个变量 (PHP_OPENSSL_DIR) 未设置为“yes”

    所以你应该这样做:

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

    【讨论】:

      猜你喜欢
      • 2016-10-02
      • 2016-01-01
      • 2011-09-03
      • 2013-04-16
      • 1970-01-01
      • 2017-03-16
      • 2017-04-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多