LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-22-2008, 12:20 PM   #1
christyyim
Member
 
Registered: Oct 2008
Location: earth
Distribution: Ubuntu 'Gutsy Gibbon'
Posts: 32

Rep: Reputation: 15
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.
 
Old 12-22-2008, 12:23 PM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
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?
 
Old 12-22-2008, 01:11 PM   #3
christyyim
Member
 
Registered: Oct 2008
Location: earth
Distribution: Ubuntu 'Gutsy Gibbon'
Posts: 32

Original Poster
Rep: Reputation: 15
the error message i get is

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

Any idea?
 
Old 12-22-2008, 01:34 PM   #4
christyyim
Member
 
Registered: Oct 2008
Location: earth
Distribution: Ubuntu 'Gutsy Gibbon'
Posts: 32

Original Poster
Rep: Reputation: 15
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.
 
Old 12-22-2008, 01:55 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,027

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
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 ?

Last edited by schneidz; 12-22-2008 at 01:57 PM.
 
Old 12-23-2008, 04:18 AM   #6
christyyim
Member
 
Registered: Oct 2008
Location: earth
Distribution: Ubuntu 'Gutsy Gibbon'
Posts: 32

Original Poster
Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
version GLIBC_2.3 not found error when cross compiled executable is run on targert sateeshgalla Programming 3 05-14-2008 11:42 AM
problem with the cross compiled executable??? raklo Linux - Kernel 0 04-03-2007 08:16 AM
Question regarding running a compiled executable in aterm siraluun Programming 2 07-27-2006 09:15 AM
Run executable file compiled by kylix and mysql in Fedora Core 4 aa_husni Fedora 0 09-15-2005 01:14 AM
Executable compiled w/gcc won't run brancheb Programming 5 05-16-2004 02:56 PM


All times are GMT -5. The time now is 04:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration