yum sqlite error

Sometimes you may get the following error while working with yum:

root@server2 [~]# yum install kernel-smp
Setting up Install Process
Setting up repositories
update                    100% |=========================|  951 B    00:00
base                      100% |=========================| 1.1 kB    00:00
addons                    100% |=========================|  951 B    00:00
extras                    100% |=========================| 1.1 kB    00:00
Reading repository metadata in from local files
update    : ################################################## 372/372
Traceback (most recent call last):
  File “/usr/bin/yum”, line 29, in ?
    yummain.main(sys.argv[1:])
  File “/usr/share/yum-cli/yummain.py”, line 97, in main
    result, resultmsgs = do()
  File “/usr/share/yum-cli/cli.py”, line 470, in doCommands
    return self.installPkgs()
  File “/usr/share/yum-cli/cli.py”, line 836, in installPkgs
    self.doRepoSetup()
  File “/usr/share/yum-cli/cli.py”, line 75, in doRepoSetup
    self.doSackSetup(thisrepo=thisrepo)
  File “__init__.py”, line 260, in doSackSetup
  File “repos.py”, line 287, in populateSack
  File “sqlitecache.py”, line 96, in getPrimary
  File “sqlitecache.py”, line 89, in _getbase
  File “sqlitecache.py”, line 373, in updateSqliteCache
  File “/var/tmp/python-sqlite-root//usr/lib/python2.3/site-packages/sqlite/main.py”, line 244, in execute
_sqlite.DatabaseError: unable to open database file

To fix this
You will have to erase the sqlite, sqlite-devel,python-sqlite rpm packages in your system

Matching packages have to be manually downloaded and installed 

You can use http://rpm.pbone.net/ to download the package for the particular release of your operating system

rpm -qa|grep -i sqlite
rpm -e sqlite python-sqlite sqlite-devel

Then install the packages downloaded from rpm.pbone.net

Posted under apt, yum

This post was written by Anoop Alias on May 7, 2008

Tags: ,

Leave a Comment

Name (required)

Email (required)

Website

Comments

More Blog Post