Skip to content
Advertisement

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?

Advertisement

Answer

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):

http://centos.telecoms.bg/8/BaseOS/x86_64/os/Packages/yum-4.0.9.2-5.el8.noarch.rpm

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

# rpm -q -R http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-29.19.0.40-1.el8.x86_64.rpm
/bin/sh
/bin/sh
anaconda-core = 29.19.0.40-1.el8
anaconda-gui = 29.19.0.40-1.el8
anaconda-install-env-deps = 29.19.0.40-1.el8
anaconda-tui = 29.19.0.40-1.el8
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 http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-29.19.0.40-1.el8.x86_64.rpm  
http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-core-29.19.0.40-1.el8.x86_64.rpm  
http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-gui-29.19.0.40-1.el8.x86_64.rpm  
http://centos.telecoms.bg/8/AppStream/x86_64/os/Packages/anaconda-install-env-deps-29.19.0.40-1.el8.x86_64.rpm 

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