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 > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-10-2012, 11:55 PM   #1
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73
Blog Entries: 1

Rep: Reputation: 2
Can't use yum to install packages.


Hi all,

This moring,I use yum to install packages,and the electric power shut down suddenly and my Desktop power off.

When the electric power on again,I use yum to install packages.And the error codes are as follows:

Code:
 Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 223, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 625, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1481, in runTransaction
    lastdbv = self.history.last()
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 1148, in last
    ret = self.old([], 1, complete_transactions_only)
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 1097, 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
Can some people tell me why and how to slove this problem?
 
Old 01-10-2012, 11:57 PM   #2
saahil2012
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Rep: Reputation: Disabled
Your hard disk might be damaged. check for disk errors using fdisk command
 
Old 01-11-2012, 02:49 PM   #3
MartinStrec
Member
 
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110

Rep: Reputation: 14
Try clean and rebuild RPM and YUM database:

rm -f /var/lib/rpm/__db*
rpm –rebuilddb
yum clean all
 
Old 01-11-2012, 07:26 PM   #4
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73

Original Poster
Blog Entries: 1

Rep: Reputation: 2
Quote:
Originally Posted by MartinStrec View Post
Try clean and rebuild RPM and YUM database:

rm -f /var/lib/rpm/__db*
rpm –rebuilddb
yum clean all
It doesn't work,the problem still exist.And I don't think my hard disk drive have error,because my Desktop can boot .
 
Old 01-11-2012, 08:07 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by jimtony View Post
Code:
sqlite3.DatabaseError: database disk image is malformed
Run 'yum history new' and try again?
 
1 members found this post helpful.
Old 01-11-2012, 09:18 PM   #6
jimtony
Member
 
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73

Original Poster
Blog Entries: 1

Rep: Reputation: 2
Quote:
Originally Posted by unSpawn View Post
Run 'yum history new' and try again?
It works again, thanks unSpawn for your help.And thanks to MartinStrec and saahil2012 also.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RHEL 5 (Tikanga) Using Yum to install packages dg1988 Red Hat 4 04-13-2011 02:17 PM
How to install multiple packages using yum noony123 Linux - Newbie 3 12-15-2010 06:10 AM
Yum can't install packages mickeyboa Fedora 1 12-06-2009 12:38 PM
Using Yum To Install Packages Arty Ziff Linux - Newbie 4 12-30-2008 04:23 PM
How to install packages from DVD with Yum? vlaki22 Linux - Software 1 09-02-2006 08:10 AM

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

All times are GMT -5. The time now is 11:52 PM.

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