Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I open a terminal, it says cannot execute the binary file and the output is something like this,

bash: /home/sandeep/bin/uname: cannot execute binary file
bash: [: =: unary operator expected
bash: /home/sandeep/bin/sed: cannot execute binary file
bash: /home/sandeep/bin/ls: cannot execute binary file

This is followed by normal prompt where everything is fine. But as a programmer it is annoying to see those many errors every time you open a terminal.

The reason I found out is that when I installed a armeabi tool chain it created a folder called bin in the home directory and all the executables inside this directory are for arm processor. But my terminal when it is being opened it is trying to execute these arm binaries and hence it shows an error that these binaries cannot be executed (since my proc is not arm).

To solve this I can remove this folder (I tried it and it worked) but thats not the optimal solution. I want to know the script that is getting executed when I open a terminal where it is trying to execute wrong binaries at the launch.

I had a look at ~/.bashrc but there is nothing relevant to my problem in that.

share|improve this question
2  
Perhaps you should post your .bashrc anyway. –  TLP Sep 5 '11 at 11:31
    
You can narrow it down a bit as you can see that it is calling sed and uname. Use grep to see which dot files contain both those commands. –  Richard Holloway Sep 5 '11 at 14:38
    
Yes, I would post both .bashrc and .bash_profile along with /etc/profile. –  Justin Andrusk Sep 5 '11 at 15:27
1  
Remove ~/bin from your $PATH, have your arm development tools have a different $PATH –  aquaherd Sep 8 '11 at 18:10

1 Answer 1

As suggested by aquaherd, I would move the arm utils to a different directory so they are not in your path:

mkdir ~/armdev/
mv ~/bin ~/armdev/

Then you will have to add ~/armdev/bin/ to the path of your arm development tools, but that shouldn't be too hard (and is probably a separate question where you should specify what tools you are using for the arm development).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.