Portal Home > Knowledgebase > Articles Database > python not installed


python not installed




Posted by esmailnejad, 01-14-2011, 02:44 PM
hello i need your help i have cpanel server x86-64 centos 5.5 i have below error in yum -bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory root@ [/]# rpm -V python package python is not installed please help me how to install pyton

Posted by LiquidWebBenny, 01-14-2011, 03:21 PM
That's really odd, but it shouldn't be too hard. Unless I'm missing something, 'yum install python' should work?

Posted by esmailnejad, 01-14-2011, 03:23 PM
root@mydc [/]# yum install python -bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory

Posted by LiquidWebBenny, 01-14-2011, 03:34 PM
Oooh, yeah. I missed that on your first post, and clearly forgot that Yum was written in python. You can try installing the python RPM by hand. You should be able to get it from any CentOS Repo.

Posted by asciiDigital, 01-14-2011, 03:36 PM
Is this a VPS?

Posted by esmailnejad, 01-14-2011, 03:38 PM
no , dedicate server thanks

Posted by skywin, 01-14-2011, 03:44 PM
cPanel needs Python to run. Run the following command. rpm -q python

Posted by esmailnejad, 01-14-2011, 03:46 PM
root@mydc [/]# rpm -q python package python is not installed thx

Posted by skywin, 01-14-2011, 03:49 PM
If you have a empty vps, try to reinstall cPanel. http://docs.cpanel.net/twiki/bin/vie...tallationGuide Also execute yum -y update

Posted by esmailnejad, 01-14-2011, 03:51 PM
thanks for your reply but i have more than 800 user in my server

Posted by LVPSHosting, 01-14-2011, 03:52 PM
Try: rpm -Uvh ftp://ftp.pbone.net/mirror/ftp.cento...5.3.x86_64.rpm ftp://ftp.pbone.net/mirror/ftp.cento...5.3.x86_64.rpm

Posted by LiquidWebBenny, 01-14-2011, 03:54 PM
Yum is written in python, so any instructions that tell you to use yum will not work. Download the appropriate file from here, or any of your chosen repos. http://www.python.org/download/releases/2.4/rpms/ use rpm -iUvh $packagename http://www.rpm.org/max-rpm/ch-rpm-install.html

Posted by esmailnejad, 01-14-2011, 03:57 PM
thanks : package python-devel-2.4.3-27.el5_5.3.x86_64 is already installed root@mydc [/]# yum -bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory

Posted by asciiDigital, 01-14-2011, 04:04 PM
Try this: updatedb locate yum

Posted by esmailnejad, 01-14-2011, 04:22 PM
root@mydc [/]# updatedb root@mydc [/]# locate yum /yum-2.4.2-0.4.el4.rf.noarch.rpm /etc/yum /etc/yum.conf /etc/yum.repos.d /etc/yum.repos.d.disabled /etc/yum/pluginconf.d /etc/yum/pluginconf.d/fastestmirror.conf /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Media.repo /etc/yum.repos.d/dag-clamav.repo.unsafe /etc/yum.repos.d/mirrors-rpmforge /etc/yum.repos.d/rpmforge.repo /var/lib/yum

Posted by asciiDigital, 01-14-2011, 04:31 PM
Try running /var/lib/yum

Posted by esmailnejad, 01-14-2011, 05:40 PM
i have new error in yum root@mydc [~]# 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.1 (r271:86832, Jan 4 2011, 14:51:06) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] If you cannot solve this problem yourself, please go to the yum faq at: http://wiki.linux.duke.edu/YumFaq

Posted by asciiDigital, 01-14-2011, 06:08 PM
You need to reinstall the python rpm. Somewhere in here: http://mirror.centos.org/centos/5/os/ Make sure you install the appropriate one. rpm --force -hUv python.rpm then try yum yum clean all yum makecache yum upgrade



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Need help with arrays! (Views: 582)