0
点赞
收藏
分享

微信扫一扫

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

倚然君 2022-03-12 阅读 60
nginx
./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

搞定!

举报

相关推荐

Nginx支持HTTPS,openssl生成SSL证书

0 条评论