Fedora This forum is for the discussion of the Fedora Project. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-10-2012, 11:55 PM
|
#1
|
Member
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73
Rep:
|
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?
|
|
|
01-10-2012, 11:57 PM
|
#2
|
LQ Newbie
Registered: Jan 2012
Posts: 4
Rep: 
|
Your hard disk might be damaged. check for disk errors using fdisk command
|
|
|
01-11-2012, 02:49 PM
|
#3
|
Member
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110
Rep:
|
Try clean and rebuild RPM and YUM database:
rm -f /var/lib/rpm/__db*
rpm –rebuilddb
yum clean all
|
|
|
01-11-2012, 07:26 PM
|
#4
|
Member
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73
Original Poster
Rep:
|
Quote:
Originally Posted by MartinStrec
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 .
|
|
|
01-11-2012, 08:07 PM
|
#5
|
Moderator
Registered: May 2001
Posts: 29,417
|
Quote:
Originally Posted by jimtony
Code:
sqlite3.DatabaseError: database disk image is malformed
|
Run 'yum history new' and try again?
|
|
1 members found this post helpful.
|
01-11-2012, 09:18 PM
|
#6
|
Member
Registered: Jan 2011
Location: Shanghai,China
Distribution: fedora
Posts: 73
Original Poster
Rep:
|
Quote:
Originally Posted by unSpawn
Run 'yum history new' and try again?
|
It works again, thanks unSpawn for your help.And thanks to MartinStrec and saahil2012 also.
|
|
|
All times are GMT -5. The time now is 02:35 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|