[SOLVED] Centos 5 Error :- -bash: yum: command not found
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
rpm2cpio rpm-4.4.2.3-27.el5.src.rpm | cpio -dim
and then the files which got extracted i moved them into the damaged centos os which i am trying to fix.
Now when i do this
i get this error
[root@HYD1008 1]# find . -type d -exec chmod 755 {} \;
[root@HYD1008 1]# tar cf - ./usr ./etc ./bin | (cd /; tar xvf -)
tar: ./usr: Cannot stat: No such file or directory
tar: ./etc: Cannot stat: No such file or directory
tar: ./bin: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420
Rep:
Hi Sachin,
I discussed the issue with senior engineer. If both "yum" and "rpm" packages are removed from the system then, its very hard to recover and in some cases not possible. To install any package on the system you must have either "yum" command or at-least "rpm" command. But from issue description it seems to be both commands are missing. It might be possible that, some essential files have deleted. To proceed further, please provide us output of following commands:
Code:
# cat /etc/redhat-release
# rpm -q centos-release
# uname -a
# ldd /bin/rpm
# file /bin/rpm
# find / -name librpm-* -type f
# ls -l /usr/lib|grep -i librpm-*
# ls -l /usr/lib64|grep -i librpm-*
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.