ubuntu 安装nginx ./configure 编译出错问题
一直服务器好好的用的宝塔面板,最近换了一台服务器,还是ubuntu系统盘,什么也没有改结果安装完宝塔面板,怎么也装不上nginx,看了下日志,提示:
./configure: error: the HTTP XSLT module requires the libxml2/libxslt librar
解决办法:
apt-get install libxml2 libxml2-dev libxslt-dev
用的以上代码一下就好了,特此记录,一下记录是出现一下代码问题在使用。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | . /configure : error: C compiler cc is not found 解决办法 apt install g++ . /configure : error: the HTTP rewrite module requires the PCRE library. 解决办法 apt install libpcre3 libpcre3-dev . /configure : error: SSL modules require the OpenSSL library. 解决办法 apt install openssl libssl-dev . /configure : error: the HTTP gzip module requires the zlib library. 解决办法 下载zlib-1.2.8.tar ./configure && make && make install .gz 解压,安装 . /configure : error: the HTTP XSLT module requires the libxml2 /libxslt 解决办法 apt-get install libxml2 libxml2-dev libxslt-dev |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | URCE=2 -I src /core -I src /event -I src /event/modules -I src /os/unix -I /home/always/tools/nginx-rtmp-module -I /usr/include/libxml2 -I objs \ -o objs /src/core/ngx_murmurhash .o \ src /core/ngx_murmurhash .c src /core/ngx_murmurhash .c: In function ‘ngx_murmur_hash2’: src /core/ngx_murmurhash .c:37:11: error: this statement may fall through [-Werror=implicit-fallthrough=] h ^= data[2] << 16; ~~^~~~~~~~~~~~~~~~ src /core/ngx_murmurhash .c:38:5: note: here case 2: ^~~~ src /core/ngx_murmurhash .c:39:11: error: this statement may fall through [-Werror=implicit-fallthrough=] h ^= data[1] << 8; ~~^~~~~~~~~~~~~~~ src /core/ngx_murmurhash .c:40:5: note: here case 1: ^~~~ cc1: all warnings being treated as errors objs /Makefile :659: recipe for target 'objs/src/core/ngx_murmurhash.o' failed make [1]: *** [objs /src/core/ngx_murmurhash .o] Error 1 make [1]: Leaving directory '/home/always/tools/nginx-1.10.3' Makefile:8: recipe for target 'build' failed make : *** [build] Error 2 |