nginx 编译的问题

 

+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

|  下面这个问题已经解决,方法如下: 

|   sudo apt-get remove openssl libssl-dev
|   sudo apt-get install openssl libssl-dev -y

|   (对,就是重装 openssl 和 libssl-dev)

|   感谢微博网友 @linux命令行精选网 给了我启发 。

|

|   下面添加一下关键字,以便能让遇到同样问题的小伙伴搜索到,尽快解决问题,少走弯路和不要放弃。

|   complie nginx, install nginx

|   checking for OpenSSL library ... not found

|   ./configure: error: SSL modules require the OpenSSL library.

|   objs/Makefile:1120: recipe for target '/root/openssl-1.0.0/include/openssl/ssl.h' failed

+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

 

最近在编译安装nginx时遇到个奇怪的问题,翻遍国内外网站都没有得到解决。主要问题是checking时报如下的错:

安装php的时候也是报这个错,但我用手动编译安装openssl后,php编译安装通过。

 

尝试一 -----------------------------------------------------------------------------------------------------------------------------------------------

  当我按提示(--with-openssl=<path>)指定openssl源码路径进行编译安装:

  

   报错:

  

    我确定文件存在:

  

 

尝试二 -----------------------------------------------------------------------------------------------------------------------------------------------

         用 apt-get -y install openssl 安装好openssl先,再次编译安装nginx:

       

       报错:

  

  我确定已经安装好openssl了:

  

 

结尾   -----------------------------------------------------------------------------------------------------------------------------------------------

 

  一些猜想:

  我知道这个问题可以通过重装Linux来解决,我只是觉得奇怪为什么会这样,因为:

  1. 我在安装完Linux时先编译安装nginx,通过;接着编译安装php就报找不到“openssl library”和上面第一张图一样。

  2. 我把安装好的nginx删掉,手动编译安装openssl, 再编译安装php,通过;再来编译安装nginx就有了这篇博客里的问题。

  3. 整个事情就是这样。

  问题是不是因为我把原来安装的openssl卸载了呢?重装难道就不可以了吗?没有理由吧!

 

  两个问题:

  1. nginx编译时的checking到底是去哪里查找 ?

  2. 为什么我指定openssl源码路径时,明明路径和文件都正确都存在,还会failed

 

  基本信息: 

  1. nginx版本1.4.4;php版本5.5.7 。

  2. 其它包我都安装了“dpkg -l”的结果在这里 dpkg info 。

  3. Linux基本信息:

  

 

 


 

 

posted @ 2015-07-23 21:59  andy_1987_chen  阅读(439)  评论(0编辑  收藏  举报