./configure: error: SSL modules require the OpenSSL library nginx缺少依赖openssl-devel报错

在执行nginx的环境预检测时遇到错误,提示缺少openssl库。通过运行`yum install openssl openssl-devel`安装相关依赖后,再次执行`./configure`配置命令,问题得到解决。接着使用`make && make install`完成编译安装,最终成功安装了nginx。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

./configure ... 

执行环境预检测时安装报错:

./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.

出现此报错信息,意思就是nginx有相关前置依赖openssl-devel没有安装

[root@jenkins nginx-1.12.2]# yum -y install openssl openssl-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: repo.virtualhosting.hk
 * epel: hkg.mirror.rackspace.com
 * extras: mirror.xtom.com.hk
 * updates: mirror-hk.koddos.net
Resolving Dependencies
--> Running transaction check
---> Package openssl.x86_64 1:1.0.2k-22.el7_9 will be updated
...
...
Installed:
  openssl-devel.x86_64 1:1.0.2k-24.el7_9                                                                                                                                                                                                    
Dependency Installed:
  keyutils-libs-devel.x86_64 0:1.5.8-3.el7   krb5-devel.x86_64 0:1.15.1-51.el7_9   libcom_err-devel.x86_64 0:1.42.9-19.el7   libkadm5.x86_64 0:1.15.1-51.el7_9   libselinux-devel.x86_64 0:2.5-15.el7   libsepol-devel.x86_64 0:2.5-10.el7  
  libverto-devel.x86_64 0:0.2.5-4.el7       
Updated:
  openssl.x86_64 1:1.0.2k-24.el7_9                                                                                                                                                                                                          
Dependency Updated:
  openssl-libs.x86_64 1:1.0.2k-24.el7_9                                                                                                                                                                                                     
Complete!

安装完再次执行

[root@jenkins nginx-1.12.2]# ./configure --prefix=/opt/nginx/ --user=nginx --group=nginx --with-pcre --with-http_v2_module --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-http_v2_module --with-threads --with-stream --with-stream_ssl_module

报错已不在,

Configuration summary
  + using threads
  + using system PCRE library
  + using system OpenSSL library
  + using system zlib library
  nginx path prefix: "/opt/nginx/"
  nginx binary file: "/opt/nginx//sbin/nginx"
  nginx modules path: "/opt/nginx//modules"
  nginx configuration prefix: "/opt/nginx//conf"
  nginx configuration file: "/opt/nginx//conf/nginx.conf"
  nginx pid file: "/opt/nginx//logs/nginx.pid"
  nginx error log file: "/opt/nginx//logs/error.log"
  nginx http access log file: "/opt/nginx//logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"

继续执行编译安装命令

[root@jenkins nginx-1.12.2]# make && make install

搞定!

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

蒙多不减肥

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值