
centos7 docker 컨테이너에 python-pip를 설치하려고 하는데 일부 패키지 등이 누락된 것 같습니다.
[root@aasdfasdfa /]# yum -y install python-pip
Loaded plugins: fastestmirror, ovl
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
updates/7/x86_64/primary_db | 8.4 MB 00:00:31
Loading mirror speeds from cached hostfile
* base: repos.lax.quadranet.com
* extras: mirrors.unifiedlayer.com
* updates: mirrors.usc.edu
No package python-pip available.
Error: Nothing to do
yum -y install python-pip
올바르게 설치하려면 먼저 무엇을 실행해야 합니까 ? 이 부분 easy_install
도 손상되어 옵션이 아닙니다.
답변1
EPEL 저장소를 활성화하려면 다음을 사용하세요.
yum --enablerepo=extras install epel-release
이 명령은 실행 중인 CentOS 버전에 맞는 EPEL 저장소를 설치합니다.
그러면 python-pip를 설치할 수 있습니다.
답변2
나는 같은 문제에 대해 미쳐 가고있었습니다. yum이 python-pip를 찾을 수 없는 이유는 더 이상 python-pip라고 부르지 않기 때문입니다. EPEL 버전 7부터 Python 버전을 식별하기 위해 이름이 변경되었습니다. 내 centOS 컴퓨터에서 이제 다음 python*-pip 패키지를 찾을 수 있습니다.
[root@asdasdasdasdsa ~]# yum info python*-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.rz.uni-frankfurt.de
* epel: mirrors.mit.edu
* extras: mirror.23media.de
* updates: ftp.plusline.de
Available Packages
Name : python2-pip
Arch : noarch
Version : 8.1.2
Release : 5.el7
Size : 1.7 M
Repo : epel/x86_64
Summary : A tool for installing and managing Python 2 packages
URL : http://www.pip-installer.org
License : MIT
Description : Pip is a replacement for `easy_install
: <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
: same techniques for finding packages, so packages that were made
: easy_installable should be pip-installable as well.
Name : python34-pip
Arch : noarch
Version : 8.1.2
Release : 5.el7
Size : 1.7 M
Repo : epel/x86_64
Summary : A tool for installing and managing Python3 packages
URL : http://www.pip-installer.org
License : MIT
Description : Pip is a replacement for `easy_install
: <http://peak.telecommunity.com/DevCenter/EasyInstall>`_. It uses mostly the
: same techniques for finding packages, so packages that were made
: easy_installable should be pip-installable as well.
답변3
CentOS Docker 이미지에는 일반 CentOS 설치처럼 기본적으로 EPEL 저장소가 포함되지 않습니다. yum install epel-release
먼저, 그 후에 작동 해야 yum install python-pip
합니다.
답변4
epel repo를 설치한 후에도 동일한 오류가 발생하면 다음을 시도해 보십시오.
sudo yum install -y --enablerepo="epel" python-pip