Pip 使用yum命令从epel失败

Pip 使用yum命令从epel失败,pip,redhat,yum,epel,Pip,Redhat,Yum,Epel,谢谢你来解决我的问题。我已经看到了很多关于使用yum命令失败的解决方案,但直到现在,这些解决方案都不适用于我 首先,以下是一些有关情况的信息: 我使用的是RedHat Linux 7.2-11,使用的是代理(因为我公司的网络非常安全),因此我已经用http_proxy、proxy_user和proxy_密码修改了etc/sysconfig/rhn/up2date、etc/wgetrc和etc/yum.conf文件 然后,我以root用户身份连接,并尝试通过以下命令下载python pip: su

谢谢你来解决我的问题。我已经看到了很多关于使用yum命令失败的解决方案,但直到现在,这些解决方案都不适用于我

首先,以下是一些有关情况的信息: 我使用的是RedHat Linux 7.2-11,使用的是代理(因为我公司的网络非常安全),因此我已经用http_proxy、proxy_user和proxy_密码修改了etc/sysconfig/rhn/up2date、etc/wgetrc和etc/yum.conf文件

然后,我以root用户身份连接,并尝试通过以下命令下载python pip:

sudo yum install python-pip
我有以下错误:

No package python-pip available
在python pip之前尝试安装epel版本时,出现了完全相同的错误。 然后我做了以下工作:

yum install httpd php php-gd php-mysql
最后,我下载并安装了epel release,并在/tmp中使用以下命令:

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install epel-release-latest-7.noarch.rpm
一切都很好

问题就在这里。之后,我再次尝试这些命令:

sudo yum install python-pip
sudo yum install -y python-pip
第一个错误是:

One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
........some tips (1 to 5)........
Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again
因此,我按照一些说明修改了epel.repo和epel-testing.repo,对所有“镜像”行进行注释,并对所有“baseurl”行取消注释。 因此,现在,当我再次尝试安装python pip时,出现以下错误:

Loaded plugins: rhnplugin, search-disabled-repos
This system is receiving updates from RHN Classic or Red Hat Satellite.
http://download.fedoraproject.org/pub/epel/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 407 - Proxy Authentication Required
Trying other mirror.


One of the configured repositories failed (Extra Packages for Enterprise Linux 7 - x86_64),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:

.........some tips (1 to 5).......

failure: repodata/repomd.xml from epel: [Errno 256] No more mirrors to try.
http://download.fedoraproject.org/pub/epel/7/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 407 - Proxy Authentication Required
请问你知道如何解决这个问题,或者你有什么想法? 这似乎是因为代理,但我已经配置了三个文件,如我的消息顶部所述


谢谢你的帮助!:)

您不必在CentOS-7机箱上手动下载epel版本。repo文件中可能缺少最新的RPM
mirrorlist
,它可能正在调用
baseurl=http://
,而不是
mirrorlist=https://

以下是解决此问题的方法:

 # Remove already installed epel-release
 yum remove epel-release
 OR
 rpm -e epel-release

 # Install epel-release using YUM
 yum install epel-release

 # Install python-pip
 yum install python-pip
~]# yum install python-pip
Loaded plugins: fastestmirror
epel/x86_64/metalink                                                                                                                                  |  11 kB  00:00:00     
epel                                                                                                                                                 | 4.3 kB  00:00:00     
(1/3): epel/x86_64/group_gz                                                                                                                          | 170 kB  00:00:00     
(2/3): epel/x86_64/updateinfo                                                                                                                        | 769 kB  00:00:01     
(3/3): epel/x86_64/primary_db                                                                                                                        | 4.6 MB  00:00:06     
Loading mirror speeds from cached hostfile
* base: mirror.eboundhost.com
* epel: ftp.cse.buffalo.edu
* extras: repo.us.bigstepcloud.com
* updates: centos.mirrors.tds.net
Resolving Dependencies
--> Running transaction check
---> Package python2-pip.noarch 0:8.1.2-5.el7 will be installed
--> Processing Dependency: python-setuptools for package: python2-pip-8.1.2-5.el7.noarch
--> Running transaction check
---> Package python-setuptools.noarch 0:0.9.8-4.el7 will be installed
--> Processing Dependency: python-backports-ssl_match_hostname for package: python-setuptools-0.9.8-4.el7.noarch
--> Running transaction check
---> Package python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7 will be installed
--> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch
--> Running transaction check
---> Package python-backports.x86_64 0:1.0-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved


  Package                                                      Arch                                Version  

  Repository                     Size

Installing:
 python2-pip                                                  noarch                          8.1.2-5.el7                               epel                          1.7 M
Installing for dependencies:
 python-backports                                             x86_64                          1.0-8.el7                                 base                          5.8 k
 python-backports-ssl_match_hostname                          noarch                          3.4.0.2-4.el7                             base                           12 k
 python-setuptools                                            noarch                          0.9.8-4.el7                               base                          396 k

Transaction Summary

您不必在CentOS-7机箱上手动下载epel版本。repo文件中可能缺少最新的RPM
mirrorlist
,它可能正在调用
baseurl=http://
,而不是
mirrorlist=https://

以下是解决此问题的方法:

 # Remove already installed epel-release
 yum remove epel-release
 OR
 rpm -e epel-release

 # Install epel-release using YUM
 yum install epel-release

 # Install python-pip
 yum install python-pip
~]# yum install python-pip
Loaded plugins: fastestmirror
epel/x86_64/metalink                                                                                                                                  |  11 kB  00:00:00     
epel                                                                                                                                                 | 4.3 kB  00:00:00     
(1/3): epel/x86_64/group_gz                                                                                                                          | 170 kB  00:00:00     
(2/3): epel/x86_64/updateinfo                                                                                                                        | 769 kB  00:00:01     
(3/3): epel/x86_64/primary_db                                                                                                                        | 4.6 MB  00:00:06     
Loading mirror speeds from cached hostfile
* base: mirror.eboundhost.com
* epel: ftp.cse.buffalo.edu
* extras: repo.us.bigstepcloud.com
* updates: centos.mirrors.tds.net
Resolving Dependencies
--> Running transaction check
---> Package python2-pip.noarch 0:8.1.2-5.el7 will be installed
--> Processing Dependency: python-setuptools for package: python2-pip-8.1.2-5.el7.noarch
--> Running transaction check
---> Package python-setuptools.noarch 0:0.9.8-4.el7 will be installed
--> Processing Dependency: python-backports-ssl_match_hostname for package: python-setuptools-0.9.8-4.el7.noarch
--> Running transaction check
---> Package python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7 will be installed
--> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.4.0.2-4.el7.noarch
--> Running transaction check
---> Package python-backports.x86_64 0:1.0-8.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved


  Package                                                      Arch                                Version  

  Repository                     Size

Installing:
 python2-pip                                                  noarch                          8.1.2-5.el7                               epel                          1.7 M
Installing for dependencies:
 python-backports                                             x86_64                          1.0-8.el7                                 base                          5.8 k
 python-backports-ssl_match_hostname                          noarch                          3.4.0.2-4.el7                             base                           12 k
 python-setuptools                                            noarch                          0.9.8-4.el7                               base                          396 k

Transaction Summary

嗨,我是马瑟!非常感谢。但是,epel版本与python pip存在相同的问题:当我尝试“yum install-epel-release”时,出现了以下错误:“没有可用的包epel-release。错误:无事可做”。这就是为什么我必须手动执行此操作,不幸的是,它无法解决我的问题。请检查
/etc/yum.repos.d/CentOS Base.repo
中是否有
extras
部分。如果是,则检查它是否已启用,如果未运行
yum--enablerepo=*extras*安装epel版本
实际上,我甚至没有CentOS-Base.repo。我刚刚在/etc/yum.repos.d/epel.repo中找到了添加代理的解决方案。所以我再次尝试了yum安装python-pip,它成功了!然而,由于我公司的代理,我将不被允许安装带有“pip install superset”的superset(这是我的第一个目标)。现在有人告诉我。。。所以,非常感谢你的帮助!!嗨,我是马瑟!非常感谢。但是,epel版本与python pip存在相同的问题:当我尝试“yum install-epel-release”时,出现了以下错误:“没有可用的包epel-release。错误:无事可做”。这就是为什么我必须手动执行此操作,不幸的是,它无法解决我的问题。请检查
/etc/yum.repos.d/CentOS Base.repo
中是否有
extras
部分。如果是,则检查它是否已启用,如果未运行
yum--enablerepo=*extras*安装epel版本
实际上,我甚至没有CentOS-Base.repo。我刚刚在/etc/yum.repos.d/epel.repo中找到了添加代理的解决方案。所以我再次尝试了yum安装python-pip,它成功了!然而,由于我公司的代理,我将不被允许安装带有“pip install superset”的superset(这是我的第一个目标)。现在有人告诉我。。。所以,非常感谢你的帮助!!