Toggle navigation
Koozali.org: home of the SME Server
Community
Forums
Bugs
Lists
Forum Help
Download
SME Server ISOs
Contribs
Documentation
Manual
Wiki
FAQ
HowTo
Donate
Search
Login
Register
Login
Register
×
Close
Login
Remember me
Koozali.org: home of the SME Server
Legacy Forums
General Discussion (Legacy)
Topic:
Problem executing binary file
« previous
next »
+
Print
Pages: [
1
]
Go Down
Problem executing binary file
5 Replies
461 Views
Richter
Problem executing binary file
«
on:
August 03, 2002, 01:47:42 PM »
Could someone here fill me up with a problem I'm having?
I wanted to compile packages on my SME Server so I've downloaded following RPMs like it was specified in the FAQ
cpp
glibc-devel
glib-devel
make
libstdc++-devel
gcc
gcc-c++
kernel-headers
I had no problem installing those packages and in fact I had no problem compiling a program after installing them
So what seems the problem?
Well it sound damn but I am having problem executing the binary file that was written after compiling the package
for example I can compile a source code
helloworld.cpp with
g++ helloworld.cpp -o helloworld
but it does not execute the program when I type "helloworld" at the console
So.... whatta hell?
I appreciate any input, what seems the problem and how I go fixing it?
Logged
brian read
Re: Problem executing binary file
«
Reply #1 on:
August 03, 2002, 05:01:56 PM »
you must make sure that the executible file is set executible (your compiler may have done this for you)
chmod +x helloworld
and also Linux(unix) does not look in the current directory for executibles when you try to executre them on the command line, try
./helloworld
Cheers
Brian
Logged
Richter
Re: Re: Problem executing binary file
«
Reply #2 on:
August 03, 2002, 06:05:05 PM »
thank you very much Brian,
You are right, it was the problem with the path.
I assumed linux would run executables in current directory but I guess I was dead wrong
once again thanks heaps
Cheers
Logged
Luke Drumm
Re: Re: Problem executing binary file
«
Reply #3 on:
August 06, 2002, 02:40:47 AM »
Note: This is feature of being logged in as root.
'Normal' users of linux tend to have the path set up so that it looks in the current directory but it's deemed wiser for root not to work this way.
It provides extra protection against malicous users creating trojan programs for root to accidently run.
Regards,
Luke
Logged
brian read
Re: Re: Problem executing binary file
«
Reply #4 on:
August 06, 2002, 10:05:15 AM »
Thanks for that, didn't know...
Must try logging in as something other that root occasionally.
Cheers
Brian
Logged
Richter
Re: Re: Problem executing binary file
«
Reply #5 on:
August 06, 2002, 07:22:56 PM »
Yes same here,
I know it's bad habit and it is never advised to login as root all the time
but I tend to be lazy to switch back to normal user even when I'm not doing administrative task
Anyway, it's good to know these kinda stuff,
thanks Luke
Logged
+
Print
Pages: [
1
]
Go Up
« previous
next »
Koozali.org: home of the SME Server
Legacy Forums
General Discussion (Legacy)
Topic:
Problem executing binary file