2 problem rpm + yum no work

YairNet

Verified User
Joined
Apr 29, 2010
Messages
18
yum the problem started I upgraded to python
Code:
[root@server ~]# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.3 (default, Jan 26 2013, 19:47:35)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://yum.baseurl.org/wiki/Faq


[root@server ~]#


rpm problem - Every command I do is think many time apart from -help
Code:
[root@server ~]#  rpm -qa
Does not respond?
 
If rpm does not work, then you might need to compile it from sources and then update broken packages.
Please note, I'm as well as some other members of the forums are available for such a job. Send me a PM for a quote, if you want me to fix your issue.
 
If rpm does not work, then you might need to compile it from sources and then update broken packages.
Please note, I'm as well as some other members of the forums are available for such a job. Send me a PM for a quote, if you want me to fix your issue.
You can not tell me how to fix?
 
Note, that is only my guess (you might need firstly fix other things which probably stayed beyond your view), so someone really should take a look at your server and issue.

Try to strace the rpm/yum and see what is wrong.
 
Thank you
I re-installed rpm
But got a problem I do not show rpm already install
Code:
[root @ server ~] # rpm-qa
[root @ server ~] #
[/ code]
How can I fix this? update list?
 
new problem
[root@server etc]# yum update
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http or file.
Eg. $releasever is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/addons/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: addons
[root@server etc]# cat /proc/version
Linux version 2.6.18-348.el5PAE ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)) #1 SMP Tue Jan 8 18:39:56 EST 2013
[root@server etc]# uname -a
Linux server.linuxserv.co.il 2.6.18-348.el5PAE #1 SMP Tue Jan 8 18:39:56 EST 2013 i686 i686 i386 GNU/Linux
[root@server etc]#
 
try this! please note make a file backup first.

rm -f /var/lib/rpm/__db*
rpm --rebuilddb
 
Last edited:
Code:
[root@server base]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. $releasever is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: base
Code:
[root@server base]# cd /etc/yum.repos.d
[root@server yum.repos.d]# ls
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Media.repo  CentOS-Vault.repo  tmp.tar
[root@server yum.repos.d]# cat CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Code:
[root@server yum.repos.d]# yum repolist all
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. $releasever is not a valid release or hasnt been released yet/
removing mirrorlist with no valid mirrors: /var/cache/yum/base/mirrorlist.txt
repo id                                                                                                    repo name                                                                                                                status
C5.0-base                                                                                                  CentOS-5.0 - Base                                                                                                        disabled
C5.0-centosplus                                                                                            CentOS-5.0 - Plus                                                                                                        disabled
C5.0-extras                                                                                                CentOS-5.0 - Extras                                                                                                      disabled
C5.0-updates                                                                                               CentOS-5.0 - Updates                                                                                                     disabled
C5.1-base                                                                                                  CentOS-5.1 - Base                                                                                                        disabled
C5.1-centosplus                                                                                            CentOS-5.1 - Plus                                                                                                        disabled
C5.1-extras                                                                                                CentOS-5.1 - Extras                                                                                                      disabled
C5.1-updates                                                                                               CentOS-5.1 - Updates                                                                                                     disabled
C5.2-base                                                                                                  CentOS-5.2 - Base                                                                                                        disabled
C5.2-centosplus                                                                                            CentOS-5.2 - Plus                                                                                                        disabled
C5.2-extras                                                                                                CentOS-5.2 - Extras                                                                                                      disabled
C5.2-updates                                                                                               CentOS-5.2 - Updates                                                                                                     disabled
C5.3-base                                                                                                  CentOS-5.3 - Base                                                                                                        disabled
C5.3-centosplus                                                                                            CentOS-5.3 - Plus                                                                                                        disabled
C5.3-extras                                                                                                CentOS-5.3 - Extras                                                                                                      disabled
C5.3-updates                                                                                               CentOS-5.3 - Updates                                                                                                     disabled
C5.4-base                                                                                                  CentOS-5.4 - Base                                                                                                        disabled
C5.4-centosplus                                                                                            CentOS-5.4 - Plus                                                                                                        disabled
C5.4-extras                                                                                                CentOS-5.4 - Extras                                                                                                      disabled
C5.4-updates                                                                                               CentOS-5.4 - Updates                                                                                                     disabled
C5.5-base                                                                                                  CentOS-5.5 - Base                                                                                                        disabled
C5.5-centosplus                                                                                            CentOS-5.5 - Plus                                                                                                        disabled
C5.5-extras                                                                                                CentOS-5.5 - Extras                                                                                                      disabled
C5.5-updates                                                                                               CentOS-5.5 - Updates                                                                                                     disabled
C5.6-base                                                                                                  CentOS-5.6 - Base                                                                                                        disabled
C5.6-centosplus                                                                                            CentOS-5.6 - Plus                                                                                                        disabled
C5.6-extras                                                                                                CentOS-5.6 - Extras                                                                                                      disabled
C5.6-updates                                                                                               CentOS-5.6 - Updates                                                                                                     disabled
C5.7-base                                                                                                  CentOS-5.7 - Base                                                                                                        disabled
C5.7-centosplus                                                                                            CentOS-5.7 - Plus                                                                                                        disabled
C5.7-extras                                                                                                CentOS-5.7 - Extras                                                                                                      disabled
C5.7-updates                                                                                               CentOS-5.7 - Updates                                                                                                     disabled
base                                                                                                       CentOS-$releasever - Base                                                                                                enabled: 0
c5-media                                                                                                   CentOS-$releasever - Media                                                                                               disabled
centosplus                                                                                                 CentOS-$releasever - Plus                                                                                                disabled
contrib                                                                                                    CentOS-$releasever - Contrib                                                                                             disabled
debug                                                                                                      CentOS-5 - Debuginfo                                                                                                     disabled
extras                                                                                                     CentOS-$releasever - Extras                                                                                              enabled: 0
updates                                                                                                    CentOS-$releasever - Updates                                                                                             enabled: 0
repolist: 0
Code:
[root@server yum.repos.d]# ping google.com
PING google.com (173.194.70.113) 56(84) bytes of data.
64 bytes from fa-in-f113.1e100.net (173.194.70.113): icmp_seq=1 ttl=49 time=70.9 ms

--- google.com ping statistics ---
2 packets transmitted, 1 received, 50% packet loss, time 1001ms
rtt min/avg/max/mdev = 70.968/70.968/70.968/0.000 ms
[root@server yum.repos.d]#


I tried everything ... Nothing
 
Back
Top