Results 1 to 7 of 7
I'm trying to run my (finally :P ) compiled code and it's giving me this:
bash: ./main: Permission denied
please help...
- 02-07-2010 #1Just Joined!
- Join Date
- Feb 2010
- Posts
- 5
can't run compiled code
I'm trying to run my (finally :P ) compiled code and it's giving me this:
bash: ./main: Permission denied
please help
- 02-07-2010 #2
you need to set execute bit, chmod +x main
- 02-07-2010 #3Just Joined!
- Join Date
- Feb 2010
- Posts
- 5
OK now it gives
bash: ./main: cannot execute binary file
- 02-07-2010 #4
how did you compile it? if you used a makefile, post it
- 02-07-2010 #5This means it isn't a valid executable file. There are lotsbash: ./main: cannot execute binary file
of reasons this might happen. Tell us more about your source
code, and how you compiled it.
- 02-07-2010 #6Just Joined!
- Join Date
- Feb 2010
- Posts
- 5
gah! it ended up being a linking problem
it compiles and links and runs now tyvm!
- 02-07-2010 #7Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,975



I know the feeling! One of those Homer Simpson moments...
Glad you got it sorted out.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote