LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Yum Not working (http://www.linuxquestions.org/questions/linux-server-73/yum-not-working-4175443798/)

mosi3535 01-02-2013 07:11 AM

Yum Not working
 
Hi There,

I have a case which is very annoying me .
I have a server which is should install below packages on it :

apache,dhcp,php,heartbeat,oralce client

The OS is CentOS 6.3 x86_64


but after installation all of them which is the Oracle client is last item that I installed , the YUM is not working .and any yum that you send to server it will give you the below error :


Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
epel/metalink | 4.3 kB 00:00
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 285, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 136, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 434, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 897, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 682, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 265, in populateSack
self.doSetup()
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 92, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 197, in postreposetup_hook
if downgrade_ftp and _len_non_ftp(repo.urls) == 1:
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 699, in <lambda>
urls = property(fget=lambda self: self._geturls(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 696, in _geturls
self._baseurlSetup()
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 642, in _baseurlSetup
mirrorurls.extend(list(self.metalink_data.urls()))
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 739, in <lambda>
metalink_data = property(fget=lambda self: self._getMetalink(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 726, in _getMetalink
self._metalink = metalink.MetaLinkRepoMD(result)
File "/usr/lib/python2.6/site-packages/yum/metalink.py", line 186, in __init__
root = xmlparse(filename)
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1174, in cElementTree_xmlparse
_cElementTree_import()
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1164, in _cElementTree_import
import cElementTree
ImportError: No module named cElementTree
[

The below query is for python and yum RPMs on the server :

# rpm -qa |grep python
MySQL-python-1.2.3-0.3.c1.1.el6.x86_64
rpm-python-4.8.0-27.el6.x86_64
libselinux-python-2.0.94-5.3.el6.x86_64
python-libs-2.6.6-29.el6_2.2.x86_64
newt-python-0.52.11-3.el6.x86_64
dbus-python-0.83.0-6.1.el6.x86_64
libuser-python-0.56.13-5.el6.x86_64
python-slip-0.2.20-1.el6_2.noarch
libxml2-python-2.7.6-4.el6_2.4.x86_64
python-iniparse-0.3.1-2.1.el6.noarch
abrt-addon-python-2.0.8-6.el6.centos.x86_64
python-pycurl-7.19.0-8.el6.x86_64
gnome-python2-canvas-2.28.0-3.el6.x86_64
python-2.6.6-29.el6_2.2.x86_64
python-ethtool-0.6-1.el6.x86_64
libreport-python-2.0.9-5.el6.centos.x86_64
python-urlgrabber-3.9.1-8.el6.noarch
cracklib-python-2.8.16-4.el6.x86_64
gnome-python2-2.28.0-3.el6.x86_64
python-meh-0.12.1-3.el6.noarch
python-iwlib-0.1-1.2.el6.x86_64



#rpm -qa |grep yum
yum-3.2.29-30.el6.centos.noarch
yum-plugin-fastestmirror-1.1.30-14.el6.noarch
yum-plugin-security-1.1.30-14.el6.noarch
yum-utils-1.1.30-14.el6.noarch
yum-metadata-parser-1.1.2-16.el6.x86_64

I have checked the below links , also they are not useful :

http://www.clearfoundation.com/compo...view/id,45278/
http://www.mentby.com/Group/scientif...te-python.html
http://www.linuxquestions.org/questi...nttree-797618/
https://access.redhat.com/knowledge/solutions/166953
https://bugzilla.redhat.com/show_bug.cgi?id=744380


Thanks

acid_kewpie 01-02-2013 08:21 AM

why was that clear foundation page not useful? Did you replicate the tests relating to expat that they did?

John VV 01-02-2013 11:24 AM

as per the "clearfoundation" page

that looks like a mixsmatched python install
CentOS REQUIRES !!! the exact version that is in the cent update repo

third party repos can CHANGE your version of python

this is why "yum-priorities" needs to be installed and CONFIGURED -- do not forget to set it up and configure the plugin and repos !


However with it busted the normal tools and commands will not work

so you are going to need to manually look in text files
1) /var/log/yum.log
-- see exactly what was installed ( every install has a time and date )
2)
/etc/yum.repo.d/-- every file in there
and list every one that has a "enabled=1" ( some repos are incompatible with the base install and with other repos )

-- but a quick guess is that Oracle replaced your cent version of python with one of theirs

-- if you are going to use Oracle database you might want to use Oracle's version of RHEL from the Oracle website
-- it is a custom build optimized for it's database

mosi3535 01-09-2013 01:44 AM

Solved

Guys I found the issue , the issue is related to LD_LIBRARY_PATH when we set this environment variable you can not use YUM , but when I unset this variable the issue has been resolved and yum is working now .

But the question here is how we can have this environment variable and also yum at the same time ;

regards

Habitual 01-09-2013 11:42 AM

Code:

unset LD_LIBRARY_PATH && yum
?


All times are GMT -5. The time now is 02:00 PM.