配置:错误:无法找到OpenSSL的

时间:2022-06-02 15:06:50

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。

2 个解决方案

#1


0  

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

用户> cd / src / / php /扩展

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

用户> /应用程序/ ampp / php / bin / phpize

Note: Below command is just to get the option list

注意:下面的命令只是获取选项列表。

user> ./configure --help

用户> . / configure——help

Note: options below can be fetched from --help which you executed above.

注意:下面的选项可以从上面执行的帮助中获取。

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

用户> CPPFLAGS="-m32 -I/Applications/AMPPS/extra/包括-I/any/其他/inclue/path" CFLAGS="-m32" LDFLAGS="-L/Applications/AMPPS/extra/lib -L/any/other/lib/path" ./configure -option1= value2。

user> make

用户>

user> sudo make install

用户> sudo make install

You will have to move the extension to extension directory and enable it from PHP Extension of Ampps.

您将不得不将扩展扩展到扩展目录,并使它从Ampps的PHP扩展中启用。

#2


0  

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. I've kept the details in my wiki page for those who want to understand the solution. Here's what worked for me :

您需要帮助配置查找evp的位置。h文件,因为默认情况下,它会扫描目录并向他们添加硬编码的后缀来找到它。我在我的wiki页面中为那些想了解解决方案的人保留了细节。这就是我的工作:

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). If that didn't work for you check the wiki page, it will help you figure out what paths to put.

YMMV(路径是不同的)。如果你没有检查wiki页面,它将帮助你找到放置的路径。

#1


0  

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

用户> cd / src / / php /扩展

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

用户> /应用程序/ ampp / php / bin / phpize

Note: Below command is just to get the option list

注意:下面的命令只是获取选项列表。

user> ./configure --help

用户> . / configure——help

Note: options below can be fetched from --help which you executed above.

注意:下面的选项可以从上面执行的帮助中获取。

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

用户> CPPFLAGS="-m32 -I/Applications/AMPPS/extra/包括-I/any/其他/inclue/path" CFLAGS="-m32" LDFLAGS="-L/Applications/AMPPS/extra/lib -L/any/other/lib/path" ./configure -option1= value2。

user> make

用户>

user> sudo make install

用户> sudo make install

You will have to move the extension to extension directory and enable it from PHP Extension of Ampps.

您将不得不将扩展扩展到扩展目录,并使它从Ampps的PHP扩展中启用。

#2


0  

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. I've kept the details in my wiki page for those who want to understand the solution. Here's what worked for me :

您需要帮助配置查找evp的位置。h文件,因为默认情况下,它会扫描目录并向他们添加硬编码的后缀来找到它。我在我的wiki页面中为那些想了解解决方案的人保留了细节。这就是我的工作:

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). If that didn't work for you check the wiki page, it will help you figure out what paths to put.

YMMV(路径是不同的)。如果你没有检查wiki页面,它将帮助你找到放置的路径。