grep is not working in RHEL5.3
Hi,
I have Redhat 5.3 running on my machine. But when I am login through putty it gives me below error. Without running any grep command I get this error on login and the grep command doesn't work. login as: root root@IP's password: Last login: Mon Feb 16 15:27:55 2015 from IP -bash: /bin/egrep: cannot execute binary file -bash: /bin/egrep: cannot execute binary file -bash: /bin/egrep: cannot execute binary file -bash: /bin/grep: cannot execute binary file -bash: /bin/grep: cannot execute binary file [root@bkpdrill ~]# grep MemTotal /proc/meminfo -bash: /bin/grep: cannot execute binary file |
what will uname -a and file /bin/grep respond ?
|
Please find below output:-
[root@bkpdrill ~]# uname -a Linux bkpdrill.icat.com 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux [root@bkpdrill ~]# file /bin/grep /bin/grep: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), corrupted program header size, corrupted section header size [root@bkpdrill ~]# |
So as you can see grep itself is corrupted. Probably you can try to reinstall, but would be nice to know the reason.
|
Should I have to uninstall it before reinstall? Can you tell me which version I have to install?
|
No you do not need to uninstall I think and also you need to install the package belongs that release (RHEL 5.3)
|
Hi
I download grep package but while installing it gives me below error. [root@bkpdrill icat]# rpm -ivh grep-2.6.3-6.el6.x86_64.rpm rpm: error while loading shared libraries: librpm-4.4.so: wrong ELF class: ELFCLASS64 [root@bkpdrill icat]# Please help me on this? |
I would say there are other corrupted files or ??? Something strange happened. Probably you need to reinstall everything.
|
Can you Please tell me which all things need to be reinstalled?
|
sorry, I have no idea what's happened, probably you need to reinstall the whole OS again (not only a few packages). But save your important data before that.
|
I cannot reinstall the whole OS. Can any one help me how to reinstall grep?
Also the below error is coming when I fire the command rpm -help error while loading shared libraries: librpm-4.4.so: wrong ELF class: ELFCLASS64 |
Quote:
Quote:
Quote:
http://www.linuxquestions.org/questi...-a-4175531803/ ...where you said you ran 'rm -rfv /', then said you didn't have a valid backup of your system. |
Quote:
NOT for RHEL5 !!!! you can NOT mix two very different operating systems together think of it a trying to install windows 8 exe file on XP and by doing that with copy/paste with this being REDHAT you BOUGHT IT!!! for the SUPPORT you get with the REQUIRED support contract contact redhat you are paying a lot of cash every year for that support You might want to use it |
Thanks for the reply. I copied the grep and rpm files from other machine of the same architecture. This worked perfectly fine with "grep", which was not working earlier :)
But this is not working for "rpm". I also copied some rpm dependent libraries as mentioned below: /usr/lib64/librpm.so.1 /usr/lib64/librpmbuild.so.1 /usr/lib64/librpmio.so.1 /lib64/libcap.so.2 /lib64/libdb-4.7.so /usr/lib64/libdb-4.7.so /usr/lib64/liblzma.so.0 /usr/lib64/liblzma.so.0.0.0 /usr/lib64/liblua-5.1.so After this when I fire rpm --help command I get the following error message: [root@bkpdrill ~]# rpm --help rpm: /usr/lib64/libpopt.so.0: no version information available (required by rpm) rpm: /usr/lib64/libpopt.so.0: no version information available (required by /usr/lib64/librpmbuild.so.1) rpm: /usr/lib64/libpopt.so.0: no version information available (required by /usr/lib64/librpm.so.1) rpm: /usr/lib64/libpopt.so.0: no version information available (required by /usr/lib64/librpmio.so.1) rpm: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by /usr/lib64/liblua-5.1.so) rpm: /lib64/libc.so.6: version `GLIBC_2.11' not found (required by /usr/lib64/liblua-5.1.so) Can you please tell me what this error is and how can this be resolved? Thank you in advance !!! |
Quote:
AGAIN: YOU NEED TO DO A FRESH INSTALLATION. You ran the 'rm -rfv /' command, and didn't restore from backup...congratulations, you have erased MANY Parts of your VERY OLD SYSTEM. You have ONE OPTION LEFT..do a fresh installation of the LATEST RHEL. AGAIN, 5.3 is OLD and UNSUPPORTED...7.x is the most current, and if you don't play on PAYING FOR RHEL, then load CentOS 7.x instead. If you ARE PAYING for RHEL extended support for 5.3, then CALL RED HAT, and ask what they suggest. To recap, before you ask yet again what you can do to fix your system:
|
All times are GMT -5. The time now is 09:42 PM. |