编译安装php7 报错 configure: error: Cannot find OpenSSL's libraries
![]()
![](https://img-blog.csdn.net/20170622150130506?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXFfMTYzOTk5OTE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
1)解决步骤:
参考:http://linuxzj.blog.51cto.com/6160158/1632132
root@test2:~/php-5.3.27# find / -name libssl.so
输出结果为: /usr/lib/x86_64-linux-gnu/libssl.so
初步判断它可能只会在 /usr/lib/ 下寻找 libssl.so 文件,于是:
ln -s /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib
重新编译安装即通过。
还是报同样的错误。
2)解决步骤2
参考:https://stackoverflow.com/questions/40359817/litespeed-web-server-and-error-cannot-find-openssls-libraries
![]()
![](https://img-blog.csdn.net/20170622150214294?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXFfMTYzOTk5OTE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
apt-get install build-essential libexpat1-dev libgeoip-dev libpng-dev libpcre3-dev libssl-dev libxml2-dev rcs zlib1g-dev libmcrypt-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libwebp-dev pkg-config
再次编译通过