将`nginx-dav-ext-module`安装到nginx,但不断兼容错误

发布于 2025-01-30 01:40:52 字数 1660 浏览 6 评论 0原文

我试图安装此 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文