简体   繁体   English

无法将“/usr/bin/python3”符号链接到“/home/ubuntu/my-env/bin/python3”

[英]Unable to symlink '/usr/bin/python3' to '/home/ubuntu/my-env/bin/python3'

I have Django application which is getting deployed on Code Deploy.我有一个正在部署在 Code Deploy 上的 Django 应用程序。

In logs i get an error saying 'Unable to symlink '/usr/bin/python3' to '/home/ubuntu/my-env/bin/python3'在日志中,我收到一条错误消息,说“无法将“/usr/bin/python3”符号链接到“/home/ubuntu/my-env/bin/python3”

Any clues anyone, how to fix this issue,,..?任何线索,如何解决这个问题,,..?

According to your description, I guess you used the ln -s command in Linux.根据你的描述,我猜你在Linux中使用了ln -s命令。 And you want to link /home/ubuntu/my-env/bin/python3 to /usr/bin/python3 .并且您想将/home/ubuntu/my-env/bin/python3/usr/bin/python3

When we use ln -s command, we should check if 2rd arg( /usr/bin/python3 ) exists.当我们使用ln -s命令时,我们应该检查第二个 arg( /usr/bin/python3 ) 是否存在。

So, I think the /usr/bin/python3 file in your system exists aready.所以,我认为你系统中的/usr/bin/python3文件是存在的。 You should delete it and attempt to redeploy.您应该删除它并尝试重新部署。


# 1. enter /usr/bin
cd /usr/bin/

# 2. search python3 file
ls | grep python3

# 3. delete it 
rm -rf python3

# 4. redeploy

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM