Centos 5 Error :- -bash: yum: command not found
Hi,
I have taken a centos dedicated server of linux. I tried to install one game panel to it. Somehow it did not go though well and i m in some real problem. When i try to use the command Yum it says -bash: yum: command not found It was working fine earlier. Somebody has told me i need to go for complete os reinstall. But for that i have to pay 100 dollars to data center as its chargable. Is their any way to fix it?? |
it is hard to say from here. Maybe your path is not ok, maybe yum is lost somehow, maybe you can simply restore it (if you can boot and log in and in general the host is working properly).
|
Quote:
Yes i can login into putty as root But when i try to do yum install anything or try to start any service as well i get error message [root@HYD1008 ~]# service iptables status /sbin/service: line 3: /etc/init.d/functions: No such file or directory |
I have another centos 5.7 server locally i moved init.d folder now everything is workign except for rpm and yum.
Kindly suggest what all files needs to be moved from other server to make it work? |
Have you tried /usr/bin/yum instead of just yum?
It could be possible that /usr/bin has been removed from the path. You can check by typing echo $PATH Or it could also be that yum package accidentally removed. Check if the yum packages is installed or not. |
rpm -qa | grep -i yum
Let's see if the rpm is installed. If there is some kind of response try a "which yum". If it's not installed, you can download it from the centos site. Then you can you can install the RPM via "rpm -Uvh <name of the rpm". |
[root@HYD1008 /]# cd usr
[root@HYD1008 usr]# cd bin [root@HYD1008 bin]# cd yum -bash: cd: yum: No such file or directory [root@HYD1008 bin]# yum -bash: yum: command not found [root@HYD1008 bin]# echo $path [root@HYD1008 bin]# which yum /usr/bin/which: no yum in (/opt/mono-1.9/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin) [root@HYD1008 bin]# Yes, i removed yum by mistake. and rps is also not working. Please suggest how can i install yum and rpm. Thanks |
You need following packages to install YUM software successfully -
yum python-elementtree python-iniparse python-sqlite rpm-python python-urlgrabber yum-metadata-parser m2crypto May be all the above packages already installed on your system. Code:
# rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.8-9.el5.centos.1.noarch.rpm http://mirror.centos.org/centos/5/os/i386/CentOS/python-elementtree-1.2.6-5.i386.rpm http://mirror.centos.org/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm http://mirror.centos.org/centos/5/os/i386/CentOS/python-sqlite-1.1.7-1.2.1.i386.rpm http://mirror.centos.org/centos/5/os/i386/CentOS/rpm-python-4.4.2-48.el5.i386.rpm http://mirror.centos.org/centos/5/os/i386/CentOS/python-urlgrabber-3.1.0-2.noarch.rpm http://mirror.centos.org/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-2.el5.i386.rpm http://mirror.centos.org/centos/5/os/i386/CentOS/m2crypto-0.16-6.el5.2.i386.rpm |
I get this error message
[root@HYD1008 t]# rpm -Uvh http://mirror.centos.org/centos/5/os...s.1.noarch.rpm -bash: rpm: command not found [root@HYD1008 t]# |
though i have downloaded all the rpm using wget and they r located in one directory with .rpm extension
wget http://vault.centos.org/5.7/os/x86_6...tos.noarch.rpm wget http://vault.centos.org/5.7/os/x86_6...6-5.x86_64.rpm wget http://vault.centos.org/5.7/os/x86_6...el5.noarch.rpm wget http://vault.centos.org/5.7/os/x86_6...2.1.x86_64.rpm wget http://vault.centos.org/5.7/os/x86_6...el5.x86_64.rpm wget http://vault.centos.org/5.7/os/x86_6...el5.noarch.rpm wget http://vault.centos.org/5.7/os/x86_6...tos.x86_64.rpm wget http://vault.centos.org/5.7/os/x86_6...el5.x86_64.rpm Now what should i do next? |
Then you need to download the tar package of rpm and extract the package and compile and install that package.
|
I have webmin installed, using webmin i can extract the contents os the rpg package.
but i need help in compiling them. Any walk though would be helpful. Thanks |
What is the complete name of that package?
|
Quote:
yum-3.2.22-37.el5.centos.noarch.rpm python-elementtree-1.2.6-5.x86_64.rpm python-iniparse-0.2.3-4.el5.noarch.rpm python-sqlite-1.1.7-1.2.1.x86_64.rpm rpm-python-4.4.2.3-22.el5.x86_64.rpm python-urlgrabber-3.1.0-6.el5.noarch.rpm yum-metadata-parser-1.1.2-3.el5.centos.x86_64.rpm m2crypto-0.16-8.el5.x86_64.rpm |
Quote:
|
All times are GMT -5. The time now is 02:59 PM. |