V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Newyorkcity
V2EX  ›  问与答

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

  •  
  •   Newyorkcity · 2021-05-09 16:33:45 +08:00 · 708 次点击
    这是一个创建于 1076 天前的主题,其中的信息可能已经有所发展或是发生改变。

    从官网下载源码压缩包 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 的身份跑的

    billlee
        1
    billlee  
       2021-05-09 16:36:35 +08:00   ❤️ 1
    我怎么感觉已经编译成功了
    Tink
        2
    Tink  
       2021-05-09 16:44:10 +08:00 via Android
    没毛病
    running17
        3
    running17  
       2021-05-09 16:49:44 +08:00
    这不是编译成功了吗 ,应该再执行下 make install 就装完了吧。。。
    Tink
        4
    Tink  
       2021-05-09 16:52:40 +08:00 via Android
    你从哪看出这是错误了
    mamba
        5
    mamba  
       2021-05-10 09:31:44 +08:00
    请问这有啥毛病?
    julyclyde
        6
    julyclyde  
       2021-05-10 11:33:29 +08:00
    不懂行的人建议别从源码编译
    很快你就会遇到
    1 缺编译期依赖
    2 缺运行期依赖
    3 运行的时候需要输入路径
    4 安装之后删不干净
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2904 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 07:42 · PVG 15:42 · LAX 00:42 · JFK 03:42
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.