LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-18-2012, 03:50 AM   #46
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305

Quote:
See i have another machine which has the same centos version.
Can i move some files from there and paste it here?
Did you try to install the rpms through GUI window, graphically?
 
Old 04-18-2012, 04:05 AM   #47
sachinsud
Member
 
Registered: Aug 2011
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Satyaveer Arya View Post
Did you try to install the rpms through GUI window, graphically?
Nope i have not installed GUI on the server
 
Old 04-19-2012, 02:19 AM   #48
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
It seems there has been a long discussion on installation of yum.

If possible go through this link sachinsud and follow the steps

how-to-reinstall-rpm-and-yum-without-rpm-and-yum-in-centosrhel
 
1 members found this post helpful.
Old 04-19-2012, 08:46 AM   #49
sachinsud
Member
 
Registered: Aug 2011
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by deep27ak View Post
It seems there has been a long discussion on installation of yum.

If possible go through this link sachinsud and follow the steps

how-to-reinstall-rpm-and-yum-without-rpm-and-yum-in-centosrhel

Thanks !
I have another system which i executed

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
 
Old 04-19-2012, 08:58 AM   #50
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
The error clearly shows that usr, etc and bin directories are not there.
Quote:
rpm2cpio rpm-4.4.2.3-27.el5.src.rpm | cpio -dim
Did this command exectuted successfully? Did this command extracted the files there?

Last edited by Satyaveer Arya; 04-19-2012 at 09:05 AM.
 
1 members found this post helpful.
Old 04-19-2012, 09:11 AM   #51
sachinsud
Member
 
Registered: Aug 2011
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Satyaveer Arya View Post
The error clearly shows that usr, etc and bin directories are not there.

Did this command exectuted successfully? Did this command extracted the files there?
root@HYD1008 1]# rpm2cpio rpm-4.4.2.3-27.el5.src.rpm | cpio -dim
-bash: /usr/bin/rpm2cpio: Permission denied
cpio: premature end of archive
 
Old 04-20-2012, 02:03 PM   #52
sachinsud
Member
 
Registered: Aug 2011
Posts: 38

Original Poster
Rep: Reputation: Disabled
Please close this thread as the issue i am facing is still unresolved so
i am gong for clean install next month,

Thanks Everyone
 
Old 04-22-2012, 03:48 AM   #53
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Rather than closing this thread, you can just mark it as SOLVED.
 
Old 04-22-2012, 10:12 PM   #54
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
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-*
 
Old 04-23-2012, 04:56 AM   #55
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,420

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Sachin,

Can you please give me the output of these commands,

Quote:
# 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-*
 
Old 04-23-2012, 10:43 AM   #56
sachinsud
Member
 
Registered: Aug 2011
Posts: 38

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Satyaveer Arya View Post
Sachin,

Can you please give me the output of these commands,
Sure,

My machine has come under DDOS attack and the data center has shut it down.
He will start the machine day after and then i will check and update it.

Thanks Anyways
 
Old 06-21-2012, 07:41 PM   #57
JT959
LQ Newbie
 
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
Had the same problem.
Yum removed python on one of the development servers.
Now I have no bash commands.

Are there any ways to restore the bash commands first?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] "bash: make: command not found" on CentOS 6 TehGoat Linux - Software 3 11-20-2011 03:06 PM
yum install flash ... yum: command not found ... which yum ... /usr/bin/yum tg0000 Fedora 8 04-13-2011 11:25 AM
When logging into Xserver I get a bash command not found error. AaronKillingsworth Slackware 3 12-29-2009 10:20 PM
Why -bash: rpm: command not found??? Also an rpm/yum Q? vbtalent Debian 6 01-23-2006 04:55 PM
bash: command not found error ksgill Linux - Newbie 10 07-01-2003 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration