Yum update Error in centos7


We are facing error while install or update packages from yum in centos7. Its an centos7 openVZ server. Can someone help to solve this?

Running transaction
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 365, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 271, in main
    return_code = base.doTransaction()
  File "/usr/share/yum-cli/cli.py", line 773, in doTransaction
    resultobject = self.runTransaction(cb=cb)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1798, in runTransaction
    lastdbv = self.history.last()
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 1268, in last
    ret = self.old([], 1, complete_transactions_only)
  File "/usr/lib/python2.7/site-packages/yum/history.py", line 1217, 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.OperationalError: no such table: trans_beg

Best Answer

This error suggests a corruption in your yum history database. See this bug report:


The report offers two possible suggestions:

  1. The command yum history new could potentially fix the problem by building a new history file. The downside is that this command will reset your yum history.

  2. You could try to remove some history files from /var/lib/yum/history, which will revert your history back to an earlier date.

Related Topic