升级nginx版本失败

问答中心分类: Nginx升级nginx版本失败
714708866@qq.com asked 6年 ago
在线安装的、但是想要升级nginx 、但是升级失败报错代码如下:
[openssl-1.0.2n.tar.gz] found
[pcre-8.41.tar.gz] found
Download [nginx-1.8.0.tar.gz] successfully!
[nginx-1.8.0.tar.gz] found
Press Ctrl+c to cancel or Press any key to continue...
~/oneinstack/src/nginx-1.8.0 ~/oneinstack/src ~/oneinstack ~/oneinstack
make: *** No rule to make target `clean'. Stop.
./configure: error: invalid option "--with-http_v2_module"
make: *** No targets specified and no makefile found. Stop.

8 Answers
oneinstack answered 6年 ago
输入nginx版本太低,1.8.0不支持http_v2,建议1.12.2

714708866@qq.com answered 6年 ago
你说的版本不是更低的么?客户要求安装1.8的版本、没有办法删除这个组件么?

oneinstack answered 6年 ago
可将oneinstack/include/nginx.sh中

--with-http_v2_module

删除,再次安装。

714708866@qq.com answered 6年 ago
我已经删除了、但是报错提示还是一样的!

714708866@qq.com answered 6年 ago
附上删除之后的代码
[ ! -d "$nginx_install_dir" ] && mkdir -p $nginx_install_dir
./configure --prefix=$nginx_install_dir --user=${run_user} --group=${run_user} --with-http_stub_status_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-openssl=../openssl-$openssl_ver --with-pcre=../pcre-$pcre_ver --with-pcre-jit --with-ld-opt='-ljemalloc' $nginx_modules_options
make -j ${THREAD} && make install

oneinstack answered 6年 ago
源码目录需要make clean 删除这个模块不可能再报错。。。

714708866@qq.com answered 6年 ago
不管我在/usr/local/nginx下边、还是/oneinstack/src/nginx-1.8.1下边、还是/oneinstack下边执行make clean 都是提示没有规则需要清理!

oneinstack answered 6年 ago
sed -i 's@--with-http_v2_module@@g' ~/oneinstack/include/*.sh