nginx looking in wrong dir for module
Maxim Dounin
mdounin at mdounin.ru
Sat Feb 3 01:42:52 UTC 2024
Hello!
On Fri, Feb 02, 2024 at 01:07:40PM -0500, Larry Martell wrote:
> 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
[...]
> --prefix=/usr
[...]
> --modules-path=/usr/lib/nginx/modules
[...]
> 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?
Paths in nginx configuration file are resolved from prefix (with
the exception of various included configuration files or similar
resources, which are resolved from configuration prefix).
Your configuration seems to contain
load_module modules/ndk_http_module.so;
which is resolved from /usr to /usr/modules/ndk_http_module.so.
There is no such file, hence the error.
Note that the --modules-path configure option defines where to
install modules. It is, however, your responsibility to provide
proper paths to modules in load_module directives. The
"modules/foo.so" construct will work with the default
--modules-path, which is "modules" under prefix, but you'll have
to use something different if you've modified --modules-path to a
custom value.
--
Maxim Dounin
http://mdounin.ru/
More information about the nginx
mailing list