LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Why I cannot run the compiled executable in other pc? (https://www.linuxquestions.org/questions/linux-newbie-8/why-i-cannot-run-the-compiled-executable-in-other-pc-692260/)

christyyim 12-22-2008 11:20 AM

Why I cannot run the compiled executable in other pc?
 
Why I cannot run the compiled executable file (the 'diamond' file) in other pc but just can run in the pc which compiles it?

Any solution for it?

Thanks in advanced. Nice day.

Nylex 12-22-2008 11:23 AM

Missing libraries? Different architecture? There may be other reasons too. Do you get any kinds of error messages when you try to run the executable? Can you not recompile the software on the machines on which you want to run it?

christyyim 12-22-2008 12:11 PM

the error message i get is

christyyim@christyyim-desktop:~/Desktop$ ./abc
bash: ./abc: Permission denied

Any idea?

christyyim 12-22-2008 12:34 PM

Sorry, here are some more details.

This executable was my friend sent to me and i didn't have the source code to recompile it. Both of us were using Ubuntu 7.10.

Is it because different pc, the C compiler compile the source code in different path and cause me cannot run the executable file?

Thanks.

schneidz 12-22-2008 12:55 PM

maybe change the perms on it
Code:

chmod 744 abc
or
Code:

chown christyyim abc
or
Code:

chgrp christyyim abc
man for more info.

if you are running on two pc's (i'm assuming both are x86 based) then you should be fine...

by and by, what is the diamond file ?

christyyim 12-23-2008 03:18 AM

Thanks schneidz for your reply!!!

However, I just managed to run the executable by using the 1st code, ie.

Code:

chmod 744 abc
While the other 2 codes didn't get me the permissions.

Besides that, I found out another solution for it, ie.

Code:

chmod +x abc

ps: the 'diamond' file means the executable because the shape of the executable is a diamond shape. ;)


All times are GMT -5. The time now is 01:21 AM.