|
-
January 2nd, 2002, 05:28 PM
#2
It seems like you have no compiler by what the error messages report.
$PATH is what is looked through by the shell whenever something is executed. It sorts through $PATH in the order of directories it has and the first one it finds, it would execute that one.
Example (brevity):
# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin
So if you had a file named 'foo' that echoed 'Hello World' when executed, and it resided in /bin, the shell would look through /sbin and not find it, and move to /bin, where it would find it, execute it, and you'd be seeing 'Hello World'.
Now, to attempt to solve the cc problem, we need to search your directories to find 'cc'. Here's how you do that:
# find / -name cc -exec ls -ld {} \; | awk '{ print $9 }'
Now, that'll list the whole cc executable when it finds it, path and all. To add this path to your current shell session, do this (given the example path of /usr/local/bin as the directory for cc):
# find / -name cc -exec ls -ld {} \; | awk '{ print $9 }'
/usr/local/bin/cc
Now, we know that cc lives in /usr/local/bin and now want to add it to our current session's PATH.
# export PATH=$PATH:/usr/local/bin
# echo $PATH
(paths are listed here, with /usr/local/bin at the very end).
Now, this export will only work for this shell and any forked processes, meaning you'll have to do it again if you exit out.
In Redhat linux, there's a file called /etc/PATH that you can add stuff to but I'm not sure where it is in Solaris.
Another thing that can help when finding known binaries. Use the command 'which' and that will tell you the first directory in your PATH has it. Otherwise, it'll message an error that it didn't find anything.
We the willing, led by the unknowing, have been doing the impossible for the ungrateful. We have done so much with so little for so long that we are now qualified to do just about anything with almost nothing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|