Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2003
    Location
    Manchester (UK)
    Posts
    715

    rpmdb: Program version 4.2 doesn't match environment version

    I am trying to update mysql on my development server, and i keep getting the following error. Is some one able to shed some light onto the matter?

    Thanks


    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages index using db3 - Invalid argument (22)
    error: cannot open Packages database in /var/lib/rpm
    warning: /var/spool/cpupdates/MySQL-shared-4.1.11-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
    MySQL-shared-4.1.11-0
    Last edited by slice16; 06-21-2005 at 02:25 PM.

  2. #2
    Join Date
    Sep 2002
    Location
    Top Secret
    Posts
    11,686
    sounds like your database got corrupted. Try this:
    Code:
     rm -f /var/lib/rpm/__db*
    rpm --vv --rebuilddb (--vv will be spammy but it will show you what's going on).
    Then you should be allright.
    WHMCS Guru - WHMCS addons, management, support and more.
    WHMCS Notifications Extended - Add slack, hipchat, SMS, pushover to WHMCS !!
    Always looking for Linux, WHMCS, Support Desk work. PM for details

  3. #3
    Join Date
    Jul 2003
    Location
    Manchester (UK)
    Posts
    715

  4. #4
    Join Date
    Jul 2003
    Location
    Manchester (UK)
    Posts
    715

  5. #5
    Was this a CentOS 3.4 cPanel server? I see this happening alot on CentOS 3.4 being upgraded to CentOS 3.5 by yum, and the cPanel scripts arent accounting for this.

    the rpmdb rebuild (mentioned above) works OR ( reboot + /scripts/sysup ) seem to work. You can do either one.
    Last edited by funkytaco; 06-21-2005 at 09:35 PM.

  6. #6
    Ironically, I have one now. Here is the reboot outcome.

    BEFORE REBOOT:
    [[email protected] var]# /scripts/sysup
    checkyum version 20.0
    Using Mysql4
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages index using db3 - Invalid argument (22)
    error: cannot open Packages database in /var/lib/rpm
    bandmin is not up to date (Wed Dec 31 19:00:00 1969)
    Retrieving http://updates.cpanel.net/pub/sysup/...1.6-8.noarch.r
    pm
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages index using db3 - Invalid argument (22)
    error: cannot open Packages database in /var/lib/rpm
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages database in /var/lib/rpm
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages index using db3 - Invalid argument (22)
    error: cannot open Packages database in /var/lib/rpm
    chkservd is not up to date (Wed Dec 31 19:00:00 1969)
    Retrieving http://updates.cpanel.net/pub/sysup/...d-8.0-0.noarch
    .rpm
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages index using db3 - Invalid argument (22)
    error: cannot open Packages database in /var/lib/rpm
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages database in /var/lib/rpm
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages index using db3 - Invalid argument (22)
    error: cannot open Packages database in /var/lib/rpm
    portsentry is not up to date (Wed Dec 31 19:00:00 1969)
    Retrieving http://updates.cpanel.net/pub/sysup/...entry-1.1-5.i3
    86.rpm
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages index using db3 - Invalid argument (22)
    error: cannot open Packages database in /var/lib/rpm
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages database in /var/lib/rpm
    rpmdb: Program version 4.2 doesn't match environment version
    error: db4 error(22) from dbenv->open: Invalid argument
    error: cannot open Packages index using db3 - Invalid argument (22)
    error: cannot open Packages database in /var/lib/rpm
    Traceback (most recent call last):
    File "/usr/bin/yum", line 30, in ?
    yummain.main(sys.argv[1:])
    File "/usr/share/yum/yummain.py", line 163, in main
    (log, errorlog, filelog, conf, cmds) = parseCmdArgs(args)
    File "/usr/share/yum/yummain.py", line 75, in parseCmdArgs
    conf=yumconf(configfile=yumconffile)
    File "/usr/share/yum/config.py", line 155, in __init__
    self.yumvar['releasever'] = self._getsysver()
    File "/usr/share/yum/config.py", line 285, in _getsysver
    idx = ts.dbMatch('provides', self.distroverpkg)
    TypeError: rpmdb open failed


    AFTER REBOOT:

    [email protected] [~]# /scripts/sysup
    checkyum version 20.0
    Using Mysql4
    bandmin is not up to date (Wed Dec 31 19:00:00 1969)
    Retrieving http://updates.cpanel.net/pub/sysup/...6-8.noarch.rpm
    Preparing... ########################################### [100%]
    1:bandmin ########################################### [100%]
    Upgrade appears to be done ok
    can't chdir at /usr/local/bandmin/upgrade.pl line 45.
    Can't locate httpd.conf at /usr/local/bandmin/ipaddrmap line 37.
    error: %post(bandmin-1.6-8) scriptlet failed, exit status 2
    chkservd is not up to date (Wed Dec 31 19:00:00 1969)
    Retrieving http://updates.cpanel.net/pub/sysup/...0-0.noarch.rpm
    Preparing... ########################################### [100%]
    1:chkservd ########################################### [100%]
    Stopping chkservd: [FAILED]
    Starting chkservd: [ OK ]
    portsentry is not up to date (Wed Dec 31 19:00:00 1969)
    Retrieving http://updates.cpanel.net/pub/sysup/...1.1-5.i386.rpm
    Preparing... ########################################### [100%]
    1:portsentry ########################################### [100%]
    Gathering header information file(s) from server(s)
    Server: CentOS-3 - Addons
    Server: CentOS-3 - Base
    Server: CentOS-3 - Extras
    Server: CentOS-3 - Updates
    Finding updated packages
    Downloading needed headers
    gd is installed and is the latest version.
    gd-devel is installed and is the latest version.
    expect is installed and is the latest version.
    freetype is installed and is the latest version.
    freetype-devel is installed and is the latest version.
    gnupg is installed and is the latest version.
    lynx is installed and is the latest version.
    wget is installed and is the latest version.
    sharutils is installed and is the latest version.
    bind-utils is installed and is the latest version.
    openssl is installed and is the latest version.
    openssh is installed and is the latest version.
    openssh-server is installed and is the latest version.
    openssh-clients is installed and is the latest version.
    XFree86-devel is installed and is the latest version.
    XFree86-libs is installed and is the latest version.
    perl-CPAN is installed and is the latest version.
    gcc is installed and is the latest version.
    Resolving dependencies
    .Dependencies resolved
    I will do the following:
    [install: bind-devel 20:9.2.4-7_EL3.i386]
    [install: openssl-devel 0.9.7a-33.15.i386]
    [install: bind 20:9.2.4-7_EL3.i386]
    [install: gd-progs 1.8.4-12.3.1.i386]
    I will install/upgrade these to satisfy the dependencies:
    [deps: krb5-devel 1.2.7-44.i386]
    Downloading Packages
    Getting bind-devel-9.2.4-7_EL3.i386.rpm
    bind-devel-9.2.4-7_EL3.i3 100% |=========================| 2.1 MB 00:00
    Getting openssl-devel-0.9.7a-33.15.i386.rpm
    openssl-devel-0.9.7a-33.1 100% |=========================| 1.6 MB 00:05
    Getting bind-9.2.4-7_EL3.i386.rpm
    bind-9.2.4-7_EL3.i386.rpm 100% |=========================| 460 kB 00:01
    Getting krb5-devel-1.2.7-44.i386.rpm
    krb5-devel-1.2.7-44.i386. 100% |=========================| 732 kB 00:00
    Getting gd-progs-1.8.4-12.3.1.i386.rpm
    gd-progs-1.8.4-12.3.1.i38 100% |=========================| 99 kB 00:00
    Running test transaction:
    Test transaction complete, Success!
    krb5-devel 100 % done 1/5
    warning: /etc/rndc.key created as /etc/rndc.key.rpmnew
    bind 100 % done 2/5
    bind-devel 100 % done 3/5
    openssl-devel 100 % done 4/5
    gd-progs 100 % done 5/5
    Installed: bind-devel 20:9.2.4-7_EL3.i386 openssl-devel 0.9.7a-33.15.i386 bind 20:9.2.4-7_EL3.i386 gd-progs 1.8.4-12.3.1.i386
    Dep Installed: krb5-devel 1.2.7-44.i386
    Transaction(s) Complete
    Last edited by funkytaco; 06-21-2005 at 09:38 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •