Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with gcc



In message <9408240226.AA17504 at misty.suffolk.edu> you write:
>
>I suddenly seem to be having problems with gcc as far as executing programs.
>I compiled the simple program hello.c successfuly with no errors. But when
>I go to run it with "a.out" I get a "command not found" message.
>
>Vin Cocco
>Suffolk University     email:  cocco at misty.suffok.edu

(1) Try "./a.out" instead (specifying the path to the program).  I assume 
that will work, so

(2) Type "set | grep PATH" and see whether the current directory "." is
in the path.  It should *not* be in the path for root (that would open
a security hole), but *should* be in the path for an ordinary user.
Alternatively, type "which a.out" to find out the path to the program
to be executed, or the list of directories searched.

(3) Some shells (csh but not bash, I think) cache references to
executables to save directory accesses, and you may have to type
"rehash" to refresh the cache.

(4) You should be doing ordinary program development and test using a
regular user account, and only use "root" to install them (moving files
to /usr/bin and /usr/man/man?).

                 - Jim Van Zandt <jrv at vanzandt.mv.com>





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org