1. Problem description
./configure: error: the HTTP XSLT module requires the libxml2/libxslt libraries.
You can either do not enable the module or install the libraries.
It was the first time I encountered Nginx compilation and installation failure, and then I found that the Ubuntu image of Tencent Cloud lacked libxslt.
2. Solution
There are ways to install via a package manager and to compile and install from source.
2.1.CentOS
implement:
1 | yum install libxml2 libxslt |
2.2.Ubuntu
implement:
1 | sudo apt-get install libxml2-dev sudo apt-get install libxml2 sudo apt-get install libxslt1-dev |
2.3.compile and install
If you can't install using the package, you can try to compile and install.
Screen tutorial reference:
Linux install using Screen
https://blog.tsinbei.com/archives/871/
Higher version GCC may be required ,CentOS reference:
CentOS7 compile and upgrade GCC
https://blog.tsinbei.com/archives/860/
1 | wget ftp://xmlsoft.org/libxslt/libxslt-1.1.21.tar.gz tar -xvzf libxslt-1.1.21.tar.gz cd libxslt-1.1.21 sudo autoreconf --install ./configure make sudo make install |
After the installation is successful, recompile Nginx.
Fix Missing Libxslt When Installing Nginx
Comments