Why does yum or up2date or rhnreg_ks terminate with error 'Could not determine what version of Red Hat Linux you are running' on Red Hat Enterprise Linux?
Environment
- Red Hat Enterpirse Linux 5
- Red Hat Enterpirse Linux 4
- Red Hat Enterpirse Linux 3
Issue
-
Why does yum or up2date terminate with error 'Could not determine what version of Red Hat Linux you are running' on Red Hat Enterprise Linux?
$ yum repolist Loaded plugins: changelog, downloadonly, kmod, protectbase, rhnplugin, security, versionlock rpmdb: Lock table is out of available locker entries rpmdb: Unknown locker ID: d296 error: db4 error(22) from db->close: Invalid argument error: cannot open Providename index using db3 - Cannot allocate memory (12) rpmdb: Lock table is out of available locker entries rpmdb: Unknown locker ID: d299 error: db4 error(22) from db->close: Invalid argument Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? 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 157, in main base.getOptionsConfig(args) File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig self.conf File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 664, in <lambda> conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 253, in _getConfig self.plugins.run('init') File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run func(conduitcls(self, self.base, conf, **kwargs)) File "/usr/lib/yum-plugins/rhnplugin.py", line 111, in init_hook login_info = up2dateAuth.getLoginInfo() File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 217, in getLoginInfo login() File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 181, in login maybeUpdateVersion() File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 45, in maybeUpdateVersion systemVer = up2dateUtils.getVersion() File "/usr/share/rhn/up2date_client/up2dateUtils.py", line 46, in getVersion os_release, version, release = _getOSVersionAndRelease() File "/usr/share/rhn/up2date_client/up2dateUtils.py", line 36, in _getOSVersionAndRelease raise up2dateErrors.RpmError( up2date_client.up2dateErrors.RpmError: RPM error. The message was: Could not determine what version of Red Hat Linux you are running. If you get this error, try running rpm --rebuilddb -
rhn register command against satellite server fails with the message below
$ rhnreg_ks An error has occurred: Could not determine what version of Red Hat Linux you are running. If you get this error, try running rpm --rebuilddb -
Attempting to apply updates using the Gnome Updater applet and am receiving the following error:
$ Component: pirut Summary: TB008f8aa3 up2dateUtils.py:36:_getOSVersionAndRelease:RpmError: Could not determine what version of Red Hat Linux you are running. If you get this error, try running rpm --rebuilddb
Resolution
-
This most likely indicates rpm database corruption. Rebuild rpm database, as described in How to rebuild my RPM database?
-
If the above does not resolve the error, verify if the redhat-release package is installed as shown below
$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.6 (Tikanga) $ rpm -q redhat-release redhat-release-5Server-5.6.0.3 -
If the above fails with
package redhat-release is not installedmessage, then download the latest version of this package from the appropriate base channel on Red Hat Network(RHN), and install it with the following command$ rpm -q redhat-release package redhat-release is not installed $ rpm -Uvh /path/to/redhat/release/package/from/appropriate/channel
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.