i've managed to break yum and rpm

Issues related to applications and software problems
Post Reply
randomaustralian
Posts: 1
Joined: 2018/07/10 00:32:20

i've managed to break yum and rpm

Post by randomaustralian » 2018/07/10 00:46:20

long story as short as possible. yum, wouldn't work so I found this guide to fix it...

"https://ma.ttias.be/yum-update-db_runre ... -recovery/" (poor choice)

then I worked out it wasn't working because I had no hard drive space so I found the source of all the data, removed it and yum still won't work. I do a "yum update" and it just sits there with the cursor flashing indefinitely.

so I decide yum is broke, downloaded yum from the centos archive and tried to reinstall yum manually from the rpm package and I get the same result.

so I downloaded the rpm package to reinstall rpm clean perform a...

"sudo rpm2cpio rpm-4.11.3-32.el7.x86_64.rpm | cpio -idmv" ( found this advice on this forum )

this seems to install fine. when I just run "rpm" I get all the default help information.... but when I try to re-install the yum package with "rpm -i yum-*blah*". it just freezes again.

I hope I don't have to completely reinstall as I spend a lot of time configuring this server and it would be really shitty if I have to start again because I missed a line in a script that causes data to be stored in root instead of the 10tb drive I bought to store the data.

User avatar
TrevorH
Forum Moderator
Posts: 23196
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: i've managed to break yum and rpm

Post by TrevorH » 2018/07/10 09:00:34

Last time I saw a problem with yum just hanging it was due to a package that had been installed. Unfortunately I can't remember the exact package name but it was some sort of proxy or socks software. Have you installed anything like that at all?
sudo rpm2cpio rpm-4.11.3-32.el7.x86_64.rpm | cpio -idmv
That will just unpack the rpm into the current working directory. It doesn't replace the files on the system (unless your cwd was / at the time).

Does rpm -Va work and produce any output?
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

scottro
Forum Moderator
Posts: 2378
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: i've managed to break yum and rpm

Post by scottro » 2018/07/10 12:49:33

I remember a client doing this by removing openldap-client or something similar, that removed some necessary library (for yum and rpm).
Does ldd /usr/bin/rpm show anything not found?
New users should check the FAQ and Read Me First pages

Post Reply