Skip to content

Instaling yum with dependencies on an embedded Linux [closed]

I am fairly new to Linux, and am more familiar with use of rpm and yum, the latter of course resolves dependencies and installs the whole package. I have primarily used CentOs.

I am now trying to use an embedded Linux which is quite basic and only has rpm, no dnf or yum. I wanted to install yum, so I could have some flexibility with managing packages, but using rpm, all I get is a whole bunch of dependencies, some of which I try and resolve, like dnf and python-dnf, before it becomes a never ending list.

Is there an easier way to get yum installed on my system?



To do this is sample, straight (and boring) process.

First you find where is located package for your distribution and architecture and get the URL. For example for x86_64, CentOS 8 is (one of the mirrors):

Next you need to get dependencies of this package (based on what you have already installed) (to be run as root)

# rpm -q -R
anaconda-core =
anaconda-gui =
anaconda-install-env-deps =
anaconda-tui =
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

(in above example I use different package)

So you have already /bin/sh but need anaconda-core anaconda-gui anaconda-install-env-deps anaconda-tui rpmlib

Next you search for the URL of those packages in the repo. And check them one by one for dependencies. After getting all the URLs you create one long line to install all of them. Or install first the prerequisites and then the package.

rpm -i 

User contributions licensed under: CC BY-SA
10 People found this is helpful