cannot execute binary file

sanda199 (25)
Hi when I run my program, I got "cannot execute binary file". Why is that so? If anyone know, pls kindly tell me. Thanks
DTSCode (27)
whats the exe called? cause if it was compiled on mac or windows it wont work
sanda199 (25)
I will describe you more about my situation. Actually I m trying to connect my laptop and my robot with TCP/IP socket programming. My robot also used ubuntu OS as well. My compiler to compile my program and the rest of my robot programs is G++ compiler. So after I wrote my program, I opened the directory which it is located in terminal. And I used

sudo su

for as a root user

after that I used

sudo make

to make "Makefile" between my program and the rest of programs. I was ok until that.

And after that I run my program like this


./connection.o "172.16.22.8" 4547

Cannot run. and the error is like that
bash: ./connection.o: cannot execute binary file

Why is that so? Thanks




Last edited on
sanda199 (25)
I am also using ubuntu 11.10.
ne555 (4381)
`connection.o' is just an object file, it is not executable.
Post your makefile

In general, you shouldn't `make' as root.
DTSCode (27)
and u shouldnt compile as root because then you can only edit and compile as root. and if your already su then u dont need to use sudo
Registered users can post here. Sign in or register to post.