./configure: error: the HTTP XSLT module requires the libxml2/libxslt libraries
Asked Answered
A

2

8

I recently updated my mac-os to Mojave. I was using Nginx and it was working on my previous os but after updating to Mojave, I am not able to start my Nginx. So I tried to install it again, first, it gave me c compiler error, So I downloaded the Xcode command-line tools and it was gone. Now it gives me libxml2/libxslt libraries not found. I tried to install it using brew but I still get the same error. I am not sure what is going wrong.

I have downloaded libxml2 and libxslt using brew install.

My configure script.

./configure \
--prefix=/opt/nginx/$NGINX_NAME_VERSION \
--pid-path=/var/run/nginx.pid \
--conf-path=/etc/nginx/$NGINX_NAME_VERSION/conf/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--lock-path=/var/lock/nginx.lock \
--http-client-body-temp-path=/var/tmp/nginx/body \
--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \
--http-proxy-temp-path=/var/tmp/nginx/proxy \
--http-scgi-temp-path=/var/tmp/nginx/scgi \
--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi \
--with-debug \
--with-http_addition_module \
--with-http_dav_module \
--with-http_geoip_module \
--with-http_gzip_static_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_sub_module \
--with-http_xslt_module \
--with-mail \
--with-mail_ssl_module \
--with-cc-opt=-I/usr/local/opt/openssl/include \
--with-ld-opt=-L/usr/local/opt/openssl/lib \
--builddir=$NGINX_BUILD_PATH

Error :

checking for OpenSSL library ... found
checking for zlib library ... found
checking for libxslt ... not found
checking for libxslt in /usr/local/ ... not found
checking for libxslt in /usr/pkg/ ... not found
checking for libxslt in /opt/local/ ... not found

You can see it is able to find OpenSSL, zlib but not libxslt. Please someone help me to resolve the issue.

Atalayah answered 8/8, 2019 at 14:49 Comment(0)
H
18

Try the following

sudo apt-get install libxslt-dev

You might also need

sudo apt-get install libgd-dev # for the "error: the HTTP image filter module requires the GD library." error
sudo apt-get install libgeoip-dev # for the GeoIP package
Hards answered 18/9, 2019 at 9:41 Comment(1)
On Fedora 33, this doesn't work. No such library. The usual libxslt is in fact installed, but Nginx still gives this error.Orang
G
0

Sometimes you know you have installed libxslt but nginx still keeps yelling you are not.

The actual problem behind is not about whether libxslt has been installed, is about can nginx successfully link to it. In the end, I discovered that libxlst links to an older version of icu installed on my environment. I then realize that my libxml2 is too old. After upgrading my libxml2, everything works again.

Garlaand answered 4/3, 2021 at 14:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.