No matter what package I am try to install, Yum returns a [Errno 5] [Errno 2] No such file or directory error for each package/dependency.

Here is some sample output:

# yum -y install vim
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.ocf.berkeley.edu
 * extras: mirror.tocici.com
 * updates: mirror.sesp.northwestern.edu
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.x86_64 2:7.4.160-1.el7_3.1 will be installed
--> Processing Dependency: vim-common = 2:7.4.160-1.el7_3.1 for package: 2:vim-enhanced-7.4.160-1.el7_3.1.x86_64
--> Processing Dependency: libgpm.so.2()(64bit) for package: 2:vim-enhanced-7.4.160-1.el7_3.1.x86_64
--> Running transaction check
---> Package gpm-libs.x86_64 0:1.20.7-5.el7 will be installed
---> Package vim-common.x86_64 2:7.4.160-1.el7_3.1 will be installed
--> Processing Dependency: vim-filesystem for package: 2:vim-common-7.4.160-1.el7_3.1.x86_64
--> Running transaction check
---> Package vim-filesystem.x86_64 2:7.4.160-1.el7_3.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                                                     Arch                                                Version                                                           Repository                                            Size
 vim-enhanced                                                x86_64                                              2:7.4.160-1.el7_3.1                                               updates                                              1.0 M
Installing for dependencies:
 gpm-libs                                                    x86_64                                              1.20.7-5.el7                                                      base                                                  32 k
 vim-common                                                  x86_64                                              2:7.4.160-1.el7_3.1                                               updates                                              5.9 M
 vim-filesystem                                              x86_64                                              2:7.4.160-1.el7_3.1                                               updates                                              9.7 k

Transaction Summary
Install  1 Package (+3 Dependent packages)

Total download size: 7.0 M
Installed size: 23 M
Downloading packages:

Error downloading packages:
  gpm-libs-1.20.7-5.el7.x86_64: [Errno 5] [Errno 2] No such file or directory
  2:vim-filesystem-7.4.160-1.el7_3.1.x86_64: [Errno 5] [Errno 2] No such file or directory
  2:vim-enhanced-7.4.160-1.el7_3.1.x86_64: [Errno 5] [Errno 2] No such file or directory
  2:vim-common-7.4.160-1.el7_3.1.x86_64: [Errno 5] [Errno 2] No such file or directory

it looks like it's able to connect to the repository and sees the packages/dependencies needed, but it when it goes to download it fails. I don't know much about managing repos and yum, but this looks like it could be an issue on the local machine?

Distro is CentOS Linux release 7.2.1511 (Core) on AWS.

  • What does strace -o lotsalogs -ff -e trace=file yum -y install vim show happening? – thrig Mar 31 '17 at 14:19
  • Try yum clean all and then yum install... again. – Thomas Mar 31 '17 at 14:22
  • @Thomas yum clean all did not resolve the issue unfortunately. – Chip Shadd Mar 31 '17 at 14:33
  • @thrig Thanks for that strace command, I'm seeing some issues with finding the python modules. I was monkeying around with different python installations earlier so this is probably some residual impact from that. – Chip Shadd Mar 31 '17 at 14:35
  • Yeah you might not want to mess around with the vendor space like that. Use a virtualenv or software depot outside of the vendor space... – thrig Mar 31 '17 at 15:54

You should be fine with

ln -s /usr/libexec/urlgrabber-ext-down-2.7 /usr/libexec/urlgrabber-ext-down


If you read the source code of yum and urlgrabber you will find that:

yum uses python module urlgrabber to download rpm packages whose high-level async api parallel_wait is associated to an internal class of the package _ExternalDownloader.

And the urlgrabber-ext-down's dir is hard code written in the class _ExternalDownloader as /usr/libexec/urlgrabber-ext-down in line 2075 of the urlgrabber/grabber.py.

def __init__(self):
    self.popen = subprocess.Popen(
        stdin = subprocess.PIPE,
        stdout = subprocess.PIPE,
    self.stdin  = self.popen.stdin.fileno()
    self.stdout = self.popen.stdout.fileno()
    self.running = {}
    self.cnt = 0

So just make sure your urlgrabber-ext-down is right there, or rewrite the code line 2075.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.