-1

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?

user1173240
  • 1,455
  • 2
  • 23
  • 50
  • 1
    Stack Overflow is a site for programming and development questions. You should probably use another site on the [Stack Exchange network](https://stackexchange.com/sites) for this question. Also see [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. https://superuser.com/questions/tagged/yum. – jww Dec 09 '19 at 11:07
  • Oh I am sorry, I have seen other, similar questions to this one, on the Stack Overflow board, and they did not have any remarks / cautionslike above, such as https://stackoverflow.com/questions/7532928/how-do-i-install-maven-with-yum?rq=1 . I think there is a UNIX / Linux board, I may try it there. Thank you for the remark. – user1173240 Dec 10 '19 at 04:04

1 Answers1

1

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 \

.....
Romeo Ninov
  • 6,538
  • 1
  • 22
  • 31