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, 11:20 AM   #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, 11:23 AM   #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, 12: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, 12: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, 12:55 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
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 12:57 PM.
 
Old 12-23-2008, 03: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 10:42 AM
problem with the cross compiled executable??? raklo Linux - Kernel 0 04-03-2007 07:16 AM
Question regarding running a compiled executable in aterm siraluun Programming 2 07-27-2006 08:15 AM
Run executable file compiled by kylix and mysql in Fedora Core 4 aa_husni Fedora 0 09-15-2005 12:14 AM
Executable compiled w/gcc won't run brancheb Programming 5 05-16-2004 01:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:04 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
Open Source Consulting | Domain Registration