LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 09-30-2023, 04:26 AM   #1
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Rep: Reputation: 31
Yum problems


when I try to use yum I get the following messages
Traceback (most recent call last):
File "/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 375, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 281, in main
return_code = base.doTransaction()
File "/usr/share/yum-cli/cli.py", line 817, in doTransaction
resultobject = self.runTransaction(cb=cb)
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1834, in runTransaction
lastdbv = self.history.last()
File "/usr/lib/python2.7/site-packages/yum/history.py", line 1271, in last
ret = self.old([], 1, complete_transactions_only)
File "/usr/lib/python2.7/site-packages/yum/history.py", line 1220, in old
executeSQL(cur, sql, params)
File "/usr/lib/python2.7/site-packages/yum/sqlutils.py", line 166, in executeSQLQmark
return cursor.execute(query)
sqlite3.DatabaseError: database disk image is malformed

rpm database is good tried all usual yum stuff clean all clean metadata etc but still have this problem?
Please can anyone help

Thanks in advance
 
Old 09-30-2023, 05:22 AM   #2
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Quote:
Originally Posted by james.farrow View Post
rpm database is good tried all usual yum stuff clean all clean metadata etc but still have this problem?
How is it good if
Quote:
Originally Posted by james.farrow View Post
sqlite3.DatabaseError: database disk image is malformed
I'd try
Code:
rpmdb --rebuilddb
 
Old 09-30-2023, 06:08 AM   #3
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Original Poster
Rep: Reputation: 31
Hi Shruggy

Thanks for the reply - yes I have done that as well but still have problems.
It was in the middle of yum -y update when power went off.
Then system wouldn't boot - dropped to emergency shell ☹️
I had to work out what was happening.
I managed to repair the LVM and filestsyem.
It now boots up 'fine'
I can use the rpm command but not yum.

Thanks again
 
Old 10-01-2023, 02:39 AM   #4
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Original Poster
Rep: Reputation: 31
A bit of an update...
yum only seems to fail when running the transaction itself - everything upto that point is ok.
So I got yum to download only dnf - the next iteration package manager.
Once the rpm's were downloaded I moved them all into same folder and manually installed with rpm command.

dnf check-update -> works fine and finds packaged to update
dnf update -> works and updates as expected.

I have a working system again but broken yum?
Was thinking of maybe removing yum via dnf and re-installing but not yet when things seem to be ok 😂
 
Old 10-01-2023, 12:26 PM   #5
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 296

Original Poster
Rep: Reputation: 31
# dnf -y remove yum yum-metadata-parser
# rm -Rf /etc/yum

Does what I wanted - no more yum!
All is good 😂
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: DNF (Dandified yum), the next generation of yum package manager (Fork of Yum) for Fedora system LXer Syndicated Linux News 0 08-07-2016 05:12 PM
yum install flash ... yum: command not found ... which yum ... /usr/bin/yum tg0000 Fedora 8 04-13-2011 11:25 AM
problem after yum yum yum (delicious) alaios Fedora 3 01-14-2009 02:34 AM
Fast Yum Mirror Settings For Yum ( RH9 ) fortezza Red Hat 1 06-11-2004 04:24 PM
To Yum or not to Yum cuco76 Linux - Software 2 11-25-2003 12:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 10:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration