[Linux/Ubuntu] apt-get 패키지 다운로드 서버(sources.list) 변경

<br>

1) 에러
아카이브를 받을 수 없습니다. 아마도 apt-get update를 실행해야 하거나 --fix-missing 옵션을 줘서 실행해야 할 것입니다.
kr.archive.ubuntu.com 연결 실패
Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
'kr.archive.ubuntu.com'의 주소를 알아낼 수 없습니다

kr.archive.ubuntu.com에 연결할 수 없습니다

아카이브를 받을 수 없습니다

kr.archive.ubuntu.com에 연결하는 중입니다

kr.archive.ubuntu.com 404 not found


2) 원인

Ubuntu를 한글로 변경하게 되었을 때 패키지 다운로드 서버가 자동으로 http://kr.archive.ubuntu.com/ubuntu/로 설정이 됩니다.(/etc/apt/sources.list 파일 변경) 근데 이 서버가 속도 이슈도 있고, 몇 패키지의 경우에는 설치가 안되는 에러가 있습니다. 그래서 이 기본 패키지 서버를 바꾸어주면 에러가 없어집니다.


3) 해결
패키지 다운로드 서버를 바꿔주면 됩니다.

sudo vi /etc/apt/sources.list
명령어 입력시 sources.list파일이 열립니다.

여기서
:
을 입력해 주시면 명령모드가 실행됩니다.(화면 제일 하단에 깜빡이며 명령 대기)


여기에서 %s/kr.archive.ubuntu.com/ftp.daumkakao.com을 입력해주시고 엔터를 치시면

14 substitutions on 14 lines라는 글이 명령줄에 나타날 것입니다.

그럼 :wq를 입력하고 엔터를 쳐서 커맨드 창으로 나와

sudo apt-get update; sudo apt-get upgrade -y를 실행해줍니다.

에러없이 실행되면 제대로 동작한 것입니다.

이후에 에러가 난 명령을 다시 실행해보면 이번엔 에러없이 잘 설치되는 것을 보실 수 있습니다.

에러전문

RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.


원인

이 에러는 matplotlib 패키지에서 발생하는 에러입니다.

matplotlib에서 사용되는 backend가 제대로 설정되지 못하였기 때문에 발생합니다.



해결법

Mac의 터미널에서 이하의 명령어를 입력합니다.

echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc

아무 결과가 출력되지 않으면 제대로 된 것입니다.

이후에 다시 실행해보면 제대로 동작하는 것을 확인할 수 있습니다.

+ Recent posts