我意外地删除了/usr/bin/python目录,现在我无法使用yum命令。它给出了一个错误:
/usr/bin/python: bad interpreter: No such file or directory on centos 7环境: CentOS 7
发布于 2022-03-24 11:07:30
/usr/bin/python是一个符号链接:
╰─$ ls -la python
lrwxrwxrwx 1 root root 7 Jan 15 20:56 python -> python3
╰─$ ls -la python3
lrwxrwxrwx 1 root root 10 Jan 15 20:56 python3 -> python3.10
╰─$ ls -la python3.10
-rwxr-xr-x 1 root root 14168 Jan 15 20:56 python3.10只要您没有删除所有名为python的文件,只需运行ln -s /usr/bin/python3 /usr/bin/python就可以修复这个问题
https://unix.stackexchange.com/questions/696655
复制相似问题