nginx looking in wrong dir for module

Larry Martell larry.martell at gmail.com
Fri Feb 2 18:07:40 UTC 2024


I built nginx from source and it fails to start with:

2024/02/02 13:00:59 [emerg] 1961284#1961284: dlopen()
"/usr/modules/ndk_http_module.so" failed
(/usr/modules/ndk_http_module.so: cannot open shared object file: No
such file or directory) in
/etc/nginx/modules-enabled/10-mod-http-ndk.conf:1

-V shows:

$ sudo /usr/sbin/nginx -V
nginx version: nginx/1.18.0
built by gcc 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
built with OpenSSL 1.1.1f  31 Mar 2020
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2
-fdebug-prefix-map=/build/nginx-lUTckl/nginx-1.18.0=.
-fstack-protector-strong -Wformat -Werror=format-security -fPIC
-Wdate-time -D_FORTIFY_SOURCE=2'
--with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC'
--prefix=/usr --conf-path=/etc/nginx/nginx.conf
--http-log-path=/var/log/nginx/access.log
--error-log-path=/var/log/nginx/error.log
--lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid
--modules-path=/usr/lib/nginx/modules
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-compat
--with-pcre-jit --with-http_ssl_module --with-http_stub_status_module
--with-http_realip_module --with-http_auth_request_module
--with-http_v2_module --with-http_dav_module --with-http_slice_module
--with-threads --with-http_addition_module --with-http_gunzip_module
--with-http_gzip_static_module --with-http_image_filter_module=dynamic
--with-http_sub_module --with-http_xslt_module=dynamic
--with-stream=dynamic --with-stream_ssl_module --with-mail=dynamic
--with-mail_ssl_module

ndk_http_module.so does exist in /usr/lib/nginx/modules/:

$ ls -l /usr/lib/nginx/modules/ndk_http_module.so
-rw-r--r-- 1 root root 18688 Nov 10  2022
/usr/lib/nginx/modules/ndk_http_module.so

Why is it looking in the wrong dir for this?


More information about the nginx mailing list