Notice
Recent Posts
Recent Comments
Link
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
Tags
more
Archives
Today
Total
관리 메뉴

Zorba blog

[Error] E: Unable to locate package yum 본문

파이썬

[Error] E: Unable to locate package yum

Zorba blog 2022. 6. 15. 16:40

pyannote audio 모듈을 실행하던 중 

ModuleNotFoundError: No module named '_lzma' 

에러가 발생하였다.

 

yum install -y xz-devel를 설치 하면 해결된다고 하는데,

yum 을 설치하려니 E: Unable to locate package yum 에러가 발생한다.

 

1. 에러 원인


해당 ubuntu에서 package를 다운받지 못하여서 그렇다.

/etc/apt 위치로 이동해 주어 sources.list를 수정해주어야 한다.

 

2. 해결 방법


$ cd /etc/apt/

$ sudocp sources.list sources.list.back

을 실행하여 sources.list 를 백업한다. (혹시 모르니)

 

$ sudo vi sources.list 을 실행하여 sources.list  편집모드를 실행하고,

deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu bionic-security main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse

위 코드를 sources 파일 맨 하단에 입력한 후 저장해준다.

 

저장을 완료하였으면 아래 코드를 실행.

$ sudo apt-get update

 

그리고 다시 yum을 설치하려고 코드를 실행하면

$ sudo apt install yum

 

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 yum : Depends: python-lzma but it is not going to be installed
       Depends: python-sqlitecachec but it is not going to be installed
       Depends: python-urlgrabber but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

 

이번에는 위와 같은 오류가 발생한다..

아직 설치할 패키지가 더 있다는 의미이므로

 

$ sudo apt install python-lzma

$ sudo apt install python-sqlitecachec

$ sudo apt install python-pycurl

$ sudo apt install python-urlgrabber

 

위 코드를 실행하여 패키지를 추가로 설치하고다시 아래 코드를 실행하면 설치가 완료된다!

$ sudo apt install yum

 

3. 참고링크


https://integer-ji.tistory.com/370

 

Comments