从源码编译安装 Nginx,请问这个 make[1]: Leaving directory '/root/downloads/nginx/nginx-1.20.0' 什么毛病?

2021-05-09 16:33:45 +08:00
 Newyorkcity

从官网下载源码压缩包 http://nginx.org/download/nginx-1.20.0.tar.gz

解压缩到 ~/downloads/nginx/nginx-1.20.0

切换工作目录到 ~/downloads/nginx/nginx-1.20.0

运行 ./configure 是的,啥配置项都没给。

运行成功,结果为:

Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + using system zlib library

  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  nginx modules path: "/usr/local/nginx/modules"
  nginx configuration prefix: "/usr/local/nginx/conf"
  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  nginx error log file: "/usr/local/nginx/logs/error.log"
  nginx http access log file: "/usr/local/nginx/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"

然后继续运行 make

就开始发病了:

objs/src/http/modules/ngx_http_fastcgi_module.o \
objs/src/http/modules/ngx_http_uwsgi_module.o \
objs/src/http/modules/ngx_http_scgi_module.o \
objs/src/http/modules/ngx_http_memcached_module.o \
objs/src/http/modules/ngx_http_empty_gif_module.o \
objs/src/http/modules/ngx_http_browser_module.o \
objs/src/http/modules/ngx_http_upstream_hash_module.o \
objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
objs/src/http/modules/ngx_http_upstream_random_module.o \
objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
objs/src/http/modules/ngx_http_upstream_zone_module.o \
objs/ngx_modules.o \
-ldl -lpthread -lcrypt -lpcre -lz \
-Wl,-E
sed -e "s|%%PREFIX%%|/usr/local/nginx|" \
	-e "s|%%PID_PATH%%|/usr/local/nginx/logs/nginx.pid|" \
	-e "s|%%CONF_PATH%%|/usr/local/nginx/conf/nginx.conf|" \
	-e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \
	< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory '/root/downloads/nginx/nginx-1.20.0'

为什么会出现这个错误?该如何解决呢?谢谢

我全程都是用 root 的身份跑的

713 次点击
所在节点    问与答
6 条回复
billlee
2021-05-09 16:36:35 +08:00
我怎么感觉已经编译成功了
Tink
2021-05-09 16:44:10 +08:00
没毛病
running17
2021-05-09 16:49:44 +08:00
这不是编译成功了吗 ,应该再执行下 make install 就装完了吧。。。
Tink
2021-05-09 16:52:40 +08:00
你从哪看出这是错误了
mamba
2021-05-10 09:31:44 +08:00
请问这有啥毛病?
julyclyde
2021-05-10 11:33:29 +08:00
不懂行的人建议别从源码编译
很快你就会遇到
1 缺编译期依赖
2 缺运行期依赖
3 运行的时候需要输入路径
4 安装之后删不干净

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/775822

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX