0

I have no idea to get all dependences of one rpm package(including sub-sub.. level). But I think that when I using yum to install one application, it must download all the dependences the application needs. If I can save these dependences, I can appliy them to another computer which can not connect to internet and has the same environment with that computer.So who knows how to save all the packages that are downloaded during yum installation?

Dave D
  • 21
  • 2

2 Answers2

1

Change the configue of yum. Edit file /etc/yum.conf and set "keepcache=1" then all the packages that yum downloaded will keep under path /var/cache/yum/...

Dave D
  • 21
  • 2
0

This is a complicated issue. Installing dependencies offline is complicated: if you don't have the exact same packages installed on your online and your offline server, the dependencies won't match.

If you have the exact same packages, then yum install --downloadonly might do the trick. Otherwise things get very complicated.

I have documented here a procedure that will allow you to download the dependencies required for your offline server, but it is quite tricky. It is documented for zypper, but you can transpose it to yum/dnf. The only trouble is that for dnf it only worked as root (the last time I tested): sudo dnf install --downloadonly -c <dnf.conf> --downloaddir=<output_dir> --setopt=reposdir=<repos_dir> --installroot=<tmp_dir>

Chris Maes
  • 35,025
  • 12
  • 111
  • 136