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.
--downloaddir
option? Does it download to your current location? – Timothy Martin Nov 13 '15 at 21:34If 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:06strace yum install --downloadonly zlib.i686 2> /tmp/yumdownload.txt
. Once theyum
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:02stat("/var/cache/yum/x86_64/6/local/packages/zlib-1.2.3-29.el6.i686.rpm", 0x7fff98bc1540) = -1 ENOENT (No such file or directory)
I looked in the directory referenced, and yes, sure enough, there are no packages. However, I did also find a few interesting entires further down in this log file...stat("/opt/mnt/yum/Packages/glibc-2.12-1.132.el6.i686.rpm", {st_mode=S_IFREG|0644, st_size=4549088, ...}) = 0
– Lonememe Nov 16 '15 at 23:45...and the RPMs in the /opt/mnt/yum folders disappear after a restart apparently. Frustrating.
– Lonememe Nov 16 '15 at 23:46