CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have installed speedtest cli in cent os 5.6. for that i have upgraded python 2.4 to 2.7. Speed test cli is working fine now.. But yum stopped working. i hope yum breaks all the repositories.
So none of the yum command is working,
PFB error
[root@XXYYY ~]# yum update
-bash: yum: command not found
[root@XXYYY ~]#
i have installed speedtest cli in cent os 5.6. for that i have upgraded python 2.4 to 2.7. Speed test cli is working fine now.. But yum stopped working. i hope yum breaks all the repositories.
So none of the yum command is working,
PFB error
[root@XXYYY ~]# yum update
-bash: yum: command not found
[root@XXYYY ~]#
Please help me on this.
Yum depends on python. You essentially broke python by manually upgrading it from 2.4 to 2.7. CentOS 5.6 is *VERY OLD*...so forcing this sort of thing isn't a good idea. Roll back whatever upgrade you did.
Before that, though...are you sure your PATH isn't corrupted??? Did you try just running /usr/bin/yum? Running "which yum", "locate yum", or even "find / -name yum", to see if it's still there??? What did you actually *DO* to 'upgrade' python?
Yum depends on python. You essentially broke python by manually upgrading it from 2.4 to 2.7. CentOS 5.6 is *VERY OLD*...so forcing this sort of thing isn't a good idea. Roll back whatever upgrade you did.
Before that, though...are you sure your PATH isn't corrupted??? Did you try just running /usr/bin/yum? Running "which yum", "locate yum", or even "find / -name yum", to see if it's still there??? What did you actually *DO* to 'upgrade' python?
No path is already corrupted, as i am new to Linux i have done it without getting suggestions,so guide me on this..when i do "which yum"
I am getting below erroe
[root@XXYYY ~]# which yum
/usr/bin/which: no yum in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/root/bin)
[root@XXYYY ~]#
No path is already corrupted, as i am new to Linux i have done it without getting suggestions,so guide me on this..when i do "which yum"
I am getting below erroe
[root@XXYYY ~]# which yum
/usr/bin/which: no yum in (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/root/bin)
[root@XXYYY ~]#
Ok...and what about the OTHER commands you were given???? And if you're new to Linux, why are you using such an old system, and why are you manually upgrading things past what the package manager can do???
You were also asked about what you did to perform this upgrade, and haven't answered.
The requirement yum has is "python >= 2.4", so upgrading to python-2.7 should not have broken that. Of course if you did that "upgrade" by first removing python-2.4, then yum would also have been removed due to the dependency. (But then, how would you have installed python-2.7?)
Ok...and what about the OTHER commands you were given???? And if you're new to Linux, why are you using such an old system, and why are you manually upgrading things past what the package manager can do???
You were also asked about what you did to perform this upgrade, and haven't answered.
I just joined in one company they have this Cent OS 5.6 as a server along with asterisk configuration, so i can't disturb that, even netstat commands are not working. So when i was checking yum upgrading i found these error.
i have installed python 2.7 only to get the speedtest cli.I have upgraded manually python 2.7 by using downloading rpm file for python 2.7.
Now speedtest is working fine. But none of the yum & netstat commands are working, So request you guys to help me.
The requirement yum has is "python >= 2.4", so upgrading to python-2.7 should not have broken that. Of course if you did that "upgrade" by first removing python-2.4, then yum would also have been removed due to the dependency. (But then, how would you have installed python-2.7?)
Is yum still installed? What is the output from
Code:
rpm -q yum
I haved installed manually python 2.7 by downloading python 2.7 rpm file from internet.
I installed this in different directory opt.
i have no idea abt yum now. output for above command:
OK, it's still installed. /usr/bin/yum should be a Python script, with the first line specifying the interpreter:
Code:
#!/usr/bin/python
If that interpreter is missing, you get the same "No such file or directory" message as if /usr/bin/yum were missing.
Did you "install" python-2.7 by manually copying files into /opt, or did you try to use the rpm or yum commands to install it? What does "rpm -q python" report now?
OK, it's still installed. /usr/bin/yum should be a Python script, with the first line specifying the interpreter:
Code:
#!/usr/bin/python
If that interpreter is missing, you get the same "No such file or directory" message as if /usr/bin/yum were missing.
Did you "install" python-2.7 by manually copying files into /opt, or did you try to use the rpm or yum commands to install it? What does "rpm -q python" report now?
Thanks for reply.
Installed manually by copying. i haven't used any yum command to install Python.
Installed manually by copying. i haven't used any yum command to install Python.
You should be able to run
Code:
rpm -V yum python
to verify that both packages are still intact. Changes to config files ("c" tag) are probably OK. Other changes, or complaints about missing files, are bad.
to verify that both packages are still intact. Changes to config files ("c" tag) are probably OK. Other changes, or complaints about missing files, are bad.
Looks like you did quite a bit more than just copy files to /opt. Your python-2.4 and yum installations are damaged and need to be reinstalled. You will need to download those RPMs and manually reinstall them with "rpm -i". You should be able to find the Centos 5.6 versions of those packages at vault.centos.org.
Good lessons here for new people.
In general, do not install new versions of critical software outside of the versions available FOR your release outside of the normal automated tools/repositories.
If you must, compile or install a) from sources, b) in a different tree, and c) never overwrite or corrupt the existing software.
I compile and install latest releases that have known incompatibilities for more advanced options. I am VERY careful where I install and configure those, and what ports and resources they use. I am this careful because I have had DECADES of experiences breaking critical systems, and having to fix them. It can be fun, but more often is not.
Looks like you did quite a bit more than just copy files to /opt. Your python-2.4 and yum installations are damaged and need to be reinstalled. You will need to download those RPMs and manually reinstall them with "rpm -i". You should be able to find the Centos 5.6 versions of those packages at vault.centos.org.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.