up2date problem

mikekwok
mikekwok used Ask the Experts™
on
After i have updated my Redhat Network using up2date, I found that I cannot run the up2date again. The screen is as follow :



[root@localhost root]# up2date
Traceback (innermost last):
  File "/usr/sbin/up2date", line 9, in ?
    import rpm
ImportError: librpm-4.0.4.so: cannot open shared object file: No such file or directory
[root@localhost root]#


Any suggestion for my problem?
Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Your system is looking for the library librpm-4.0.4.so

Have you changed/deleted anything recently?

slocate librpm-4.0.4.so
whereis librpm-4.0.4.so
find / -name librpm-4.0.4.so

Do those commands return back a location of the missing library?

-Jason

Author

Commented:
I found that I cannot find any librpm-4.0.4.so. What should I do ? Would you please teach me?


The screen is as follow :


[root@localhost root]# slocate librpm-4.0.4.so
[root@localhost root]# whereis librpm-4.0.4.so
librpm-4.0.4:
[root@localhost root]# find / -name librpm-4.0.4.so

[root@localhost root]#
[root@localhost root]#

Commented:

Go here

http://www.rpmfind.net/linux/rpm2html/search.php?query=librpm-4.0.4.so&submit=Search+...

Grab the *.rpm file that matches your system/redhat version,
then install it

rpm -i file.rpm

-Jason
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Author

Commented:
It is said that the rpm conflicts witht he python-popt ....

what shall i do?


[root@localhost rpm]# rpm -i rpm-4.0.4-7x.i386.rpm
error: failed dependencies:
        rpm < 4.0.4 conflicts with python-popt-0.8.8-7.x.2
[root@localhost rpm]#

Commented:
You can either force the install or remove the python rpm and reinstall it later.

-if I believe is force.

Author

Commented:
I still get the error message ...... would u tell me how to solve this?

[root@localhost rpm]# rpm --force -i rpm-4.0.4-7x.i386.rpm
error: failed dependencies:
        rpm < 4.0.4 conflicts with python-popt-0.8.8-7.x.2
[root@localhost rpm]#

Commented:
rpm -i --force should install it, did you try removing the python package first?

-jason

Author

Commented:
I cannot remove the python package ....
[root@localhost /]# rpm -e python-popt-0.8.8-7.x.2
error: removing these packages would break dependencies:
        python-popt is needed by python-clap-1.0.0-3
        poptmodule.so is needed by up2date-2.8.39-1.7.2
[root@localhost /]#

Commented:
I archived the rpm for you with the missing files, create a directory and untar it (tar xvfz rpm.tar.gz).

Then copy over the files, they are in the directories they need to go in.

www.iconimaging.net/~jradford/rpm.tar.gz


-Jason

Author

Commented:
I cannot remove the python package ....
[root@localhost /]# rpm -e python-popt-0.8.8-7.x.2
error: removing these packages would break dependencies:
        python-popt is needed by python-clap-1.0.0-3
        poptmodule.so is needed by up2date-2.8.39-1.7.2
[root@localhost /]#

Commented:
Let me know if copying those files over works..

-Jason

Author

Commented:
I cannot remove the python package ....
[root@localhost /]# rpm -e python-popt-0.8.8-7.x.2
error: removing these packages would break dependencies:
        python-popt is needed by python-clap-1.0.0-3
        poptmodule.so is needed by up2date-2.8.39-1.7.2
[root@localhost /]#

Commented:
mike,

I dont mean uninstalling the python package, I mean downloading the rpm.tar.gz and manually copying the files over into the directories.

-Jason

Author

Commented:
The situation is even much worser !!!! I even cannot run rpm....


[root@localhost root]# rpm -qa | grep rpm
error: cannot open Packages index using db1 - No such file or directory (2)
[root@localhost root]#


When I press up2date ........................

[root@localhost root]# up2date
error: cannot open Packages index using db1 - No such file or directory (2)
Traceback (innermost last):
  File "/usr/sbin/up2date", line 17, in ?
    from up2date_client import rpcServer
  File "/usr/share/rhn/up2date_client/rpcServer.py", line 8, in ?
    import up2dateAuth
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 4, in ?
    import rpmSource
  File "/usr/share/rhn/up2date_client/rpmSource.py", line 11, in ?
    import up2dateUtils
  File "/usr/share/rhn/up2date_client/up2dateUtils.py", line 15, in ?
    import rpmUtils
  File "/usr/share/rhn/up2date_client/rpmUtils.py", line 274, in ?
    rpm_version = getRpmVersion()
  File "/usr/share/rhn/up2date_client/rpmUtils.py", line 265, in getRpmVersion
    db = openrpmdb()
  File "/usr/share/rhn/up2date_client/rpmUtils.py", line 52, in openrpmdb
    raise up2dateErrors.RpmError(_("Could not open RPM database for reading.  Perhaps it is already in use?"))
up2date_client.up2dateErrors.RpmError: RPM ¿ù»~¡C ¿ù»~°T®§¬O¡G
Could not open RPM database for reading.  Perhaps it is already in use?

Commented:
try running rpm --rebuilddb

Author

Commented:
Thanks......... I can run the rpm and up2date....
However,

When i type up2date, it is said that I cannot run in interactive mode...

It cannot open a GUI interface in the KDE.

Commented:
As root run up2date -p

-Jason

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial