1

I have tried everything here but I'm stumped. I'm trying to use the downloadonly plugin for yum to download some RPMs and their dependencies but not install them. After installing the plugin, I will run the following command:

yum install --downloadonly --downloaddir=/rpms/ zlib.i686

It goes through the normal yum process, and then says "exiting because --downloadonly specified" after the Downloading packages part.

However, I can't find where the heck the packages get downloaded to! When I specify the download directory, it actually creates the folder if it doesn't exist, but then I go into the packages subfolder and there's nothing displayed.

I have tried editing the keepcache=1 in the yum.conf file, and then just not specifying the download directory, but it does the same thing.

Thoughts?

I have tried both of the suggestions in here (because I am really after downloading the RPMs and all of their dependencies) Download all dependencies with yumdownloader, even if already installed?

Still nothing.

CentOS6.5 btw.

  • What happens if you omit the --downloaddir option? Does it download to your current location? – Timothy Martin Nov 13 '15 at 21:34
  • It supposedly downloads to the default cache location folder, but when I go to that folder I find nothing downloaded. – Lonememe Nov 13 '15 at 21:45
  • Dang...I guess I've stumped everyone. I still haven't had any luck finding where they are downloading too, or if they're even downloading at all. If it helps diagnose it, I'm logged in as root. It's on a VM, but that shouldn't make a huge difference as far as I can tell. – Lonememe Nov 16 '15 at 16:06
  • Could you give this a try? strace yum install --downloadonly zlib.i686 2> /tmp/yumdownload.txt. Once the yum command is complete, search the /tmp/yumdownload.txt file for the download location (e.g. grep "^stat.*\.rpm" /tmp/yumdownload.txt). – Timothy Martin Nov 16 '15 at 18:02
  • That's a handy utility! So, I ran the strace install and searched the log file for rpms. I found a lot of entries like this" – Lonememe Nov 16 '15 at 23:37
2

Judging by the name of the path were you did find the rpms, I'm inclined to assume that that is where the repository (repodata) is/was as opposed to where they have accidentally been downloaded to. Your comment about grey padlocks further suggests that this was a locally mounted readonly device.

I'm going through the same pain and I'm about to conclude that the downloadonly options in yum will not download the rpms, if the baseurl in the repo file in /etc/yum.repos.d has a value of file:///some/path.

When I move the local repository to an apache server, the download option works swimmingly.

There is an alternative, called yumdownloader in yum-utils, that could serve you well.

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.