Solving "bash:exec:hello: hello not found" Error on Suse Linux 10.0

  • Thread starter Thread starter sid_galt
  • Start date Start date
  • Tags Tags
    Linux Running
AI Thread Summary
The discussion revolves around an issue encountered while trying to run a C++ program on Suse Linux 10.0 with the GNome interface. After compiling a simple "Hello World" application using the command "g++ -o hello hello.cpp," the user received an error message stating "bash: exec: hello: hello not found" when attempting to execute the program. The solution provided emphasizes the need to run the program with "./hello" to specify the current directory, as executables in the current directory may not be in the shell's search path. Additionally, there is a reminder to verify that the executable file named 'hello' was indeed created during compilation, as the error suggests it may not exist.
sid_galt
Messages
502
Reaction score
1
I just reinstalled Suse Linux 10.0 with GNome interface. I tried to test c++ with a hello world application. I compiled it like this

Code:
g++ -o hello hello.cpp

Although the compiler built the executable file, when I tried to run it from the shell using exec, it said

Code:
bash:exec:hello: hello not found

What's the problem?

Thank you for the help
 
Technology news on Phys.org
just try
./hello
or whatever the filename is
--shawn
 
sid_galt said:
I just reinstalled Suse Linux 10.0 with GNome interface. I tried to test c++ with a hello world application. I compiled it like this
Code:
g++ -o hello hello.cpp
Although the compiler built the executable file, when I tried to run it from the shell using exec, it said
Code:
bash:exec:hello: hello not found
What's the problem?
Thank you for the help

a.out is the output. you can rename it what ever you like, but immediately after compilation, it is called a.out... you might have to do a ./a.out if you do not have "the current directory" in your search path.
 
ComputerGeek said:
a.out is the output. you can rename it what ever you like, but immediately after compilation, it is called a.out... you might have to do a ./a.out if you do not have "the current directory" in your search path.
Normally you would be right, but not in this case. He used the '-o' flag which changed the output filename to 'hello'.

As for why this is not working, are you sure it compiled correctly? Did you check to make sure that a file called 'hello' was in fact created? Because the output is telling you that that file is not there.
 
Last edited:
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

Replies
2
Views
823
Replies
1
Views
4K
Replies
1
Views
4K
Replies
1
Views
3K
Replies
9
Views
3K
Replies
8
Views
6K
Replies
12
Views
7K
Back
Top