Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am getting the error message "-bash: /bin/hostname: cannot execute binary file" while login to my server through SSH. Can anyone please help me to resolve this problem? I searched on the web, but not found useful solution.
Also, i could not use the command like,
1. cat /var/log/messages --- its working
2. cat /var/log/messages --- it gives the error message bash: /bin/more: cannot execute binary file
I am getting the error message "-bash: /bin/hostname: cannot execute binary file" while login to my server through SSH. Can anyone please help me to resolve this problem? I searched on the web, but not found useful solution.
Also, i could not use the command like,
1. cat /var/log/messages --- its working
2. cat /var/log/messages --- it gives the error message bash: /bin/more: cannot execute binary file
Sorry, I missed the "more" in my second point. When i run the command cat /var/log/messages|more - it gives the error message as bash: /bin/more: cannot execute binary file.
I am using the RedHat Linux Enterprise Server. The "uname -a" is showing the output:
Linux (none) 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
Also, how can we know which binary is installed in the server?
I tried to list out the installed rpm packages, it shows the error message
rpm -qa
bash: /bin/rpm: cannot execute binary file
What would be the problem?
Thanks for helping me.
The problem is that you are trying to execute a binary executable file that is not meant for the computer at which you are sitting. I won't venture a guess as to how this could happen.
Somehow, your system contains binaries that are not intended for the computer (or the OS) they are installed on.
I am getting the error message "-bash: /bin/hostname: cannot execute binary file" while login to my server through SSH. Can anyone please help me to resolve this problem? I searched on the web, but not found useful solution.
Also, i could not use the command like,
1. cat /var/log/messages --- its working
2. cat /var/log/messages --- it gives the error message bash: /bin/more: cannot execute binary file
Thanks.
Tamilselvan.
You have run ssh from ??
Which distribution was that?
and have you tried that reset link I gave you? What were the results/msgs?
I tried that link to reset the permission. But not worked. Used the command
#rpm --setperms /bin/more
The result was bash: /bin/rpm: cannot execute binary file
I am connecting to our server thru SSH and working on it.
The result for cat /etc/redhat-release is
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
ls -l more is
-rwxr-xr-x 1 root root 44072 Jan 11 2009 more
ls -l hostname is
-rwxr-xr-x 1 root root 24200 Jan 11 2009 hostname
file more is
more: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), corrupted program header size, corrupted section header size
file hostname is
hostname: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), corrupted program header size, corrupted section header size
But the command file cat is
cat: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
It seems some of the bin directory files are corrupted.
What can we do for this?
Thanks chrism01, we are in the right way to solve the problem
Ok, you need to use this page to figure out which pkgs need a re-install http://kbase.redhat.com/faq/docs/DOC-2531 and then do a '--force' re-install.
I suspect it's prob coreutils or somesuch.
Actually, if 'file rpm' shows corruption, it could get tricky.
Try the above advice anyway. If it fails, I think you may be looking at backing up any user data/cfgs & re-install Os.
Alternately, if you have another system with same version of RHEL (or you can install a pc temporarily), you could just replace the corrupted binaries by copyng over from a clean install.
Basically, cd into the relevant dir(s) and run
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.