
실수로 디렉터리를 삭제했는데 /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