CentOS安装Nginx报错‘conf/koi-win‘ and ‘/opt/soft/build/nginx/conf/koi-win‘ are the same file

54 篇文章 2 订阅
17 篇文章 0 订阅

执行 make install 命令时,出现的 cp: ‘conf/koi-win‘ and ‘opt/soft/build/nginx/conf/koi-win‘ are the same file

事件还原:
nginx-1.19.6.tar.gz解压目录:/opt/soft/build/nginx

[root@AlexWong nginx]# ll
total 808
drwxr-xr-x 6 1001 1001   4096 Jan 22 11:07 auto
-rw-r--r-- 1 1001 1001 308054 Dec 15 22:41 CHANGES
-rw-r--r-- 1 1001 1001 470256 Dec 15 22:41 CHANGES.ru
drwxr-xr-x 2 1001 1001   4096 Jan 22 11:07 conf
-rwxr-xr-x 1 1001 1001   2590 Dec 15 22:41 configure
drwxr-xr-x 4 1001 1001   4096 Jan 22 11:07 contrib
drwxr-xr-x 2 1001 1001   4096 Jan 22 11:07 html
-rw-r--r-- 1 1001 1001   1397 Dec 15 22:41 LICENSE
-rw-r--r-- 1 root root    352 Jan 22 11:07 Makefile
drwxr-xr-x 2 1001 1001   4096 Jan 22 11:07 man
drwxr-xr-x 3 root root   4096 Jan 22 11:08 objs
-rw-r--r-- 1 1001 1001     49 Dec 15 22:41 README
drwxr-xr-x 9 1001 1001   4096 Jan 22 11:07 src
# 执行
root@AlexWong nginx]# ./configure  "--prefix=/opt/soft/build/nginx" 

然后 make && make install 报错

后查询资料发现,nginx不允许解压目录和安装目录为同一个,所以执行 make install 命令时,出现的 cp: ‘conf/koi-win‘ and ‘opt/soft/build/nginx/conf/koi-win‘ are the same file

后改为

[root@AlexWong nginx]# ./configure  "--prefix=/opt/nginx" 
[root@AlexWong nginx]# ll /opt/nginx
total 16
drwxr-xr-x 2 root root 4096 Jan 22 10:34 conf
drwxr-xr-x 2 root root 4096 Jan 22 10:34 html
drwxr-xr-x 2 root root 4096 Jan 22 10:34 logs
drwxr-xr-x 2 root root 4096 Jan 22 11:08 sbin

安装成功

[root@AlexWong nginx]# /opt/nginx/sbin/nginx -v
nginx version: nginx/1.19.6
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值