Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"/etc/nginx/modules/ngx_http_headers_more_filter_module.so" is not binary compatible #130

Open
adimaryadi opened this issue May 17, 2022 · 4 comments

Comments

@adimaryadi
Copy link

Anyone know why it's not compatible?
I use nginx version: nginx/1.17.8

@dvershinin
Copy link

@adimaryadi because you have to compile with a matching version and with --with-compat configure flag.

@denosaurtrain
Copy link

@dvershinin I came across this "not binary compatible" error while using Nginx 1.22. I suspect the compiler flags used for the Alpine distribution differ from the flags that the Nginx team uses for the official docker image. The nginx:stable-alpine Docker image, which is based on Nginx 1.22.0-r1 and almost matches the 1.22.0-r2 version shown in the nginx-mod-http-headers-more Alpine package. Here's a minimal reproducible example:

FROM docker.io/nginx:stable-alpine
RUN apk add --no-cache \
    nginx-mod-http-headers-more
RUN echo "load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;" > /etc/nginx/nginx.conf

Error message:

nginx: [emerg] module "/usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so" is not binary compatible in /etc/nginx/nginx.conf

I can work around the issue by using the nginx Alpine package, which is built by the same person who maintains the Alpine package for this repo.

FROM alpine:3.16
RUN apk add --no-cache \
    nginx \
    nginx-mod-http-headers-more
RUN echo "load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;" > /etc/nginx/nginx.conf
ENTRYPOINT [ "nginx" ]

I'm not sure if OP's issue is the same as mine because he didn't mention Alpine and is using nginx 1.17.8.

@glaszig
Copy link

glaszig commented Aug 23, 2022

@adimaryadi i bet the output of your nginx -V is missing --with-compat. you'll need an nginx binary that was compiled with that flag.

@vchernov-avenga
Copy link

You need to compile third party modules on your own for official Nginx Docker images nginxinc/docker-nginx#364 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants