Search code examples
pipredhatyumepel

Failure from epel with yum command


Thank you for coming to try to solve my problem. I have seen a lot of solutions about a failure using the yum command but until now, these solutions didn't work with me.

First of all, here is some information about the situation : I'm working with a RedHat Linux 7.2-11, using a proxy (because of the very secured network of my firm) so I already modified etc/sysconfig/rhn/up2date, etc/wgetrc and etc/yum.conf files with the http_proxy, proxy_user and proxy_password !

Then, I'm connected as root and I tried to download python-pip doing these command :

sudo yum install python-pip

I had the following error :

No package python-pip available

Exactly the same error when trying to install epel-release before python-pip. Then I did the following :

yum install httpd php php-gd php-mysql

Finally, I downloaded and installed epel-release with these commands in /tmp :

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install epel-release-latest-7.noarch.rpm

Everything was ok !

Here is the problem. After that, I tried again these commands :

sudo yum install python-pip
sudo yum install -y python-pip

The first error was :

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

So I followed some instructions and modified epel.repo and epel-testing.repo commenting all "mirror" lines and uncommenting all "baseurl" lines. So, now, when I try to install python-pip again I have this error :

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

Please do you know how to solve this issue, or do you have any idea ? It seems to be because of the proxy but I already configured the three files as said on top of my message.

Thank you for your help ! :)


Solution

  • You don't have to download epel-release manually on a CentOS-7 box. The latest RPM might be missing mirrorlist in the repo file, which is probably calling baseurl=http:// rather than mirrorlist=https://.

    Here is what you can do to resolve this:

     # 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