1. 程式人生 > >Ubuntu18.04編譯Nginx報錯objs/Makefile:460: recipe for target 'objs/src/core/ngx_murmurhash.o' failed

Ubuntu18.04編譯Nginx報錯objs/Makefile:460: recipe for target 'objs/src/core/ngx_murmurhash.o' failed

問題描述

在Ubuntu18.04上安裝Ngnix,在編譯步驟出現如下錯誤:

cc1: all warnings being treated as errors
objs/Makefile:460: 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/wzj/tools/nginx/nginx-1.11.3'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2

解決辦法

找到對應的Maakefile檔案,將gcc引數中的-Werror去掉。

我上面顯示的是objs/Makefile檔案,我開啟看了下,將第三行的-Werror去掉就可以