简体   繁体   English

配置:错误:找不到 OpenSSL 的<evp.h> - 在 Mac OS 10.9.4 中安装 php imagick

[英]configure: error: Cannot find OpenSSL's <evp.h> - Installing php imagick in Mac OS 10.9.4

Tried to install imagick in my php 5.3 (AMPPS)试图在我的 php 5.3 (AMPPS) 中安装 imagick

I saw instructions in net to do this command but there's an error我在 net 中看到了执行此命令的说明,但出现错误

brew install php53-imagick酿造安装php53-imagick

==> Installing php53-imagick dependency: php53
==> Downloading http://www.php.net/get/php-5.3.29.tar.bz2/from/this/mirror
######################################################################## 100.0%
==> Patching
patching file configure
patching file configure.in
patching file Zend/zend_language_parser.y
patching file configure
patching file Zend/acinclude.m4
==> rm Zend/zend_{language,ini}_parser.[ch]
==> ./configure --prefix=/usr/local/Cellar/php53/5.3.29 --localstatedir=/usr/loc
checking for krb5-config... /usr/bin/krb5-config
checking for DSA_get_default_method in -lssl... no
checking for X509_free in -lcrypto... yes
checking for pkg-config... no
configure: error: Cannot find OpenSSL's <evp.h>

How do i fix this?我该如何解决?

My PHP,Apache,Mysql is installed using AMPPS我的 PHP、Apache、Mysql 是使用 AMPPS 安装的

I know I am late but future users can follow this post.我知道我迟到了,但未来的用户可以关注这篇文章。

Download the PHP Extension Source first首先下载 PHP 扩展源

user> cd /src/of/php/extension

user> /Applications/AMPPS/php/bin/phpize

Note: Below command is just to get the option list注意:下面的命令只是为了获取选项列表

user> ./configure --help

Note: options below can be fetched from --help which you executed above.注意:下面的选项可以从上面执行的--help中获取。

user> CPPFLAGS="-m32 -I/Applications/AMPPS/extra/include -I/any/other/inclue/path" CFLAGS="-m32" LDFLAGS="-L/Applications/AMPPS/extra/lib -L/any/other/lib/path" ./configure --option1=value1 --option2=value2

user> make

user> sudo make install

You will have to move the extension to extension directory and enable it from PHP Extension of Ampps.您必须将扩展移动到扩展目录并从 Ampps 的 PHP 扩展中启用它。

Answered on server's fault .回答服务器的错误

You need to help configure figuring out where to look for the evp.h file, because by default it will scan for directories and add hardcoded suffixes to them to find it.您需要帮助配置确定在哪里查找 evp.h 文件,因为默认情况下它会扫描目录并向它们添加硬编码后缀以找到它。 I've kept the details in my wiki page for those who want to understand the solution.我已将详细信息保留在我的 wiki 页面中,供那些想要了解解决方案的人使用。 Here's what worked for me :这是对我有用的:

root@audio-mon[10.10.10.82] ~/DOWNLOADS/php-5.5.23/ext/mysqlnd # PHP_OPENSSL_DIR="/usr /usr/lib/x86_64-linux-gnu"
root@audio-mon[10.10.10.82] ~/DOWNLOADS/php-5.5.23/ext/mysqlnd # ./configure --with-libdir=""
[...]
checking for DSA_get_default_method in -lssl... yes
checking for X509_free in -lcrypto... yes
checking for pkg-config... /usr/bin/pkg-config
checking for OpenSSL version... >= 0.9.6 #                     <------------------------------------- YES !
[...]
config.status: creating config.h
config.status: config.h is unchanged
root@audio-mon[10.10.10.82] ~/DOWNLOADS/php-5.5.23/ext/mysqlnd # 

YMMV (paths are different). YMMV(路径不同)。 If that didn't work for you check the wiki page , it will help you figure out what paths to put.如果这对您不起作用,请查看 wiki 页面,它将帮助您找出要放置的路径。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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