![실수로 /usr/bin/python 디렉터리를 삭제했는데 이제 yum 명령을 사용할 수 없습니다](https://linux55.com/image/203967/%EC%8B%A4%EC%88%98%EB%A1%9C%20%2Fusr%2Fbin%2Fpython%20%EB%94%94%EB%A0%89%ED%84%B0%EB%A6%AC%EB%A5%BC%20%EC%82%AD%EC%A0%9C%ED%96%88%EB%8A%94%EB%8D%B0%20%EC%9D%B4%EC%A0%9C%20yum%20%EB%AA%85%EB%A0%B9%EC%9D%84%20%EC%82%AC%EC%9A%A9%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4.png)
실수로 디렉터리를 삭제했는데 /usr/bin/python
이제 yum 명령을 사용할 수 없습니다. 오류가 발생합니다.
/usr/bin/python: bad interpreter: No such file or directory on centos 7
환경: CentOS 7
답변1
/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