将`nginx-dav-ext-module`安装到nginx,但不断兼容错误
我试图安装此 module 将功能。
我已经从先前使用参数的来源构建并安装了nginx-1.20.0
--prefix=/var/www/html --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --with-pcre --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-http_ssl_module --with-http_image_filter_module=dynamic --modules-path=/etc/nginx/modules --with-http_v2_module --with-stream=dynamic --with-http_addition_module --with-http_mp4_module --with-http_dav_module
,它效果很好。
方法
克隆模块文件
git clone https://github.com/arut/nginx-dav-ext-module
我已经通过以下命令构建模块,使用与完全相同的文件来
./configure --with-compat --with-http_dav_module --add-dynamic-module=../nginx-dav-ext-module/
。将文件复制到模块
文件夹
cp objs/ngx_http_dav_ext_module.so /etc/nginx/modules/
的开头(HTTP上下文之外)添加此指令来加载模块。
load_module /etc/nginx/modules/ngx_http_dav_ext_module.so;
在nginx.conf
结果
,并通过 > nginx -t ,我
nginx: [emerg] module "/etc/nginx/modules/ngx_http_dav_ext_module.so" is not binary compatible in /etc/nginx/nginx.conf:4
nginx: configuration file /etc/nginx/nginx.conf test failed
已经完成了一些搜索,发现它可以与- 与compat
有关。但是,这不能解决我的问题。
什么可能会出错?
I was trying to install this module to a server to make utilities of full WebDAV functionalities.
I had built and installed Nginx-1.20.0
from source previously using arguments
--prefix=/var/www/html --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --with-pcre --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-http_ssl_module --with-http_image_filter_module=dynamic --modules-path=/etc/nginx/modules --with-http_v2_module --with-stream=dynamic --with-http_addition_module --with-http_mp4_module --with-http_dav_module
and it worked just fine.
Method
I've cloned the module file by
git clone https://github.com/arut/nginx-dav-ext-module
Built the modules by the following command, using exactly the same file used to build and install Nginx in the beginning.
./configure --with-compat --with-http_dav_module --add-dynamic-module=../nginx-dav-ext-module/
Copied the file to the Modules
folder
cp objs/ngx_http_dav_ext_module.so /etc/nginx/modules/
And loaded the module by add this directive at the beginning (outside of http context) of nginx.conf
load_module /etc/nginx/modules/ngx_http_dav_ext_module.so;
Result
As I run the check nginx -t
, I got
nginx: [emerg] module "/etc/nginx/modules/ngx_http_dav_ext_module.so" is not binary compatible in /etc/nginx/nginx.conf:4
nginx: configuration file /etc/nginx/nginx.conf test failed
I've done some search and found that it can be related to --with-compat
. However it doesn't solve my problem.
What could possibly go awry?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论