我需要在 Centos 7 服务器上使用 Nginx 模块ngx_http_auth_pam_module。由于一个包只能通过 getpagespeed 存储库获得,这不是免费的,我想自己编译它。
下面我找到的各种指令,我下载的模块和Nginx的来源,所列的编译选项Nginx的版本安装了nginx -V,然后编译的模块./configure,然后make modules,安装一些程序包修复过程中的各种错误。
但是,当我尝试配置 Nginx 以使用新编译的模块时,nginx -t给了我nginx: [emerg] module "/opt/nginx/modules/ngx_http_auth_pam_module.so" is not binary compatible in /usr/share/nginx/modules/mod-http-auth-pam.conf:1
从我读到的内容来看,这个“非二进制兼容”错误是由于已安装的 Nginx 版本与模块中的编译标志不同,但是我确保将nginx -V. 我还确保下载与安装的 Nginx 版本相同的源代码。
知道是什么导致了这个问题吗?我应该卸载 Nginx 并重新安装编译后的版本,还是有其自身的问题?
附录 :
这是整个./configure命令:
./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_auth_request_module --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module …Run Code Online (Sandbox Code Playgroud) 我需要在已部署到客户网络的 SPARC T4-1 (Solaris 11) 机器上编译一个 C 程序,它不再可以访问 Internet。本来在安装过程中,编译工具,也没有安装系统头文件,现在编译C程序时遇到了麻烦。
我已经按照 Internet 上的说明安装了一个本地存储库,pkg pubisher现在显示:
# pkg publisher
PUBLISHER TYPE STATUS URI
solaris origin online file:///export/repoSolaris11/repo/
Run Code Online (Sandbox Code Playgroud)
但是,如果我尝试安装 gcc(gcc-dev我认为是package ?),我会收到来自包管理器 ( This version is excluded by installed incorporation)的一堆抱怨,我得出的结论是,它最初是工厂安装的(机器来自 Oracle,它没有被触及),现在我尝试添加一个本地存储库,但版本不匹配。完整的安装尝试:http : //pastebin.com/m3wazmU7
我想到了另一种安装 C 编译器的方法是 Solaris Studio IDE(在 DVD 上),我cc现在在机器上,但它缺少系统头文件,所以我什至无法编译一个简单的 hello world。尝试将system/headers结果安装到与 gcc-dev 非常相似的位置:
sudo pkg install system/header
Creating Plan /
pkg install: No matching version of system/header can be installed:
Reject: pkg://solaris/system/header@0.5.11,5.11-0.175.1.0.0.24.2:20120919T184855Z
Reason: …Run Code Online (Sandbox Code Playgroud)