본문으로 바로가기
반응형

** 오류 발생 **

 

Linux Mint 18.3 Sylvia에서 Python 업그레이드 진행 후 터미널 연결이 정상적으로 이루어지지 않음.

리부팅 진행시에도 동일 (Python 2.7 → 3.9 로 업그레이드 진행)

 

 

 

** 해결방법 **

 

리부팅 진행 후 Ctrl + Alt + F2 를 눌러 터미널로 전환 (↔ 반대는 Ctrl + Alt + F7)

alternatives 로 등록되어있는 python 모두 삭제 후 다시 링크 걸기

 

# whereis python \\ python 위치 확인

 

 

# update-alternatives --config python \\ 현재 등록된 python 확인

# update-alternatives --remove python  [등록된 python] \\ python 삭제

ex)
# update-alternatives --remove python  /etc/alternatives/python
# update-alternatives --remove python  /usr/bin/python3.5
# update-alternatives --remove python  /usr/local/bin/python3.9

 

# update-alternatives --install [링크] [이름] [경로] [우선순위]


ex)
# update-alternatives --install /usr/bin/python2 python  /usr/bin/python2.7 1 1 \\ python 2.7을 python2로 1번으로 링크

# update-alternatives --install /usr/bin/python3 python /usr/local/src/Python-3.9.1 2 \\ python3.9를 python3으로 2번으로 링크

# update-alternatives --config python \\ python 버전 변경 

반응형