Computing.Net > Forums > Solaris > Need help of Setting PATH on solaris 8

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Need help of Setting PATH on solaris 8

Reply to Message Icon

Name: chis
Date: October 30, 2001 at 04:02:27 Pacific
Comment:

Hi guys,
I set up Intel Solaris 8 but the gcc compiler doesn't work. I have downloaded the gcc compiler from Unix freeware and use pkgadd and it seems to be Ok but ... I now need to set the PATH. I login a root user and want to set the path, can someone please shows me how to edit the PATH...
Which file should I edit and put in the PATH I want.

Many many thanks.
chis



Sponsored Link
Ads by Google

Response Number 1
Name: Richard Smith
Date: October 31, 2001 at 00:20:18 Pacific
Reply:

You don't need to put it in a file:

PATH=/usr/bin:/xxx/xxx

will work for the session.

If you want your own session to have an additional PATH, the edit the .profile file in your home directory, I added this line to mine:

PATH=$HOME/bin:$HOME:$PATH

To find out what the new PATH looks like, type:

$ echo $PATH

And you will get an output like:

/export/home/richard/bin:/export/home/richard:/export/home/richard/bin:/export/home/richard:/usr/bin::/usr/dt/bin:/usr/openwin/bin:/bin:/usr/ucb


0

Response Number 2
Name: Chis
Date: October 31, 2001 at 04:47:16 Pacific
Reply:

Thanks Richards,

But I login as a ROOT user how can I use .profile file? I tried to look for the .profile before and I could not find it. Do I need to login as a ROOT user? Because I want to compile MySQL and PHP using gcc. I read the MySQL document and it said I need a ROOT user to compile and install it.

Any more help will be greatful.

Thanks Richard and forum host and users.

Chis.


0

Response Number 3
Name: Richard
Date: October 31, 2001 at 08:22:44 Pacific
Reply:

You probably need to write a file named .profile. Look for .dtprofile in the ROOT user home directory and view that. There's a lot of information in there that will help.


I don't usually recomment doing any work logged in as ROOT - better to log in as your user ID, then su to root as and if you need to. Safer that way!


0

Response Number 4
Name: Jo
Date: November 1, 2001 at 06:25:06 Pacific
Reply:

You can also make changes to PATH in /etc/profile -- this file is run before the .profile of anyone that logs in.

A word of caution: Putting $HOME first in PATH reduces the security of your machine -- if someone is able to get into your $HOME directory, they will be able to put executables in your directory that you will run without knowing that you're running them. For instance, I could write a new version of "ls" that will somehow damage your system (such as "rm -r *"), put it in your $HOME, and then, next time you run "ls", you will erase everything in your $HOME directory instead of listing contents of a directory. It's a good idea not to put $HOME anywhere in PATH.

Hope this helps!


0

Response Number 5
Name: chis
Date: November 4, 2001 at 03:16:38 Pacific
Reply:

Thank you Richard and Jo for your input. I will try it latter.

Thanks.
Chis


0

Related Posts

See More



Response Number 6
Name: Ravi C
Date: November 5, 2001 at 00:26:11 Pacific
Reply:

PATH=/usr/sbin:/usr/bin:/usr/local/bin:/opt/gnome-1.4/bin:/usr/ccs/bin
LD_LIBRARY_PATH=/opt/gnome-1.4/lib

export LOGNAME PATH LD_LIBRARY_PATH


I had to change my path in /etc/profile to that to get gcc to work properly. Plus you might need autoconf/m4 and make installed also. The LD_library is for the GTK libraries. I switched out Gnome (beta) for CDE. So now I can just compile gaim or xchat or whatever else you want.


0

Response Number 7
Name: swamy
Date: January 25, 2002 at 01:55:30 Pacific
Reply:

Hi,

I have down loaded GCC compiler for solaris 8.0.
when i compile it say stdio_iso.h file missing but in the header file it is present.
please suggest me how do i move forward.

Regards,

Swamy


0

Response Number 8
Name: Phil
Date: March 8, 2002 at 08:40:00 Pacific
Reply:

I've also been having some issues with setting of the path. Wierd thing, I use to use the default shell for root, and recently changed it to bash. It seems now, when I log into CDE my path is not set properly (from /etc/profile). But when I login through telnet, no problem good path. Any ideas?


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: Need help of Setting PATH on solaris 8

NIS on Solaris 8 www.computing.net/answers/solaris/nis-on-solaris-8/1054.html

Setting up DHCP client on Solaris 8 www.computing.net/answers/solaris/setting-up-dhcp-client-on-solaris-8/468.html

Installing Gcc-3.0 on Solaris 8( Intel) www.computing.net/answers/solaris/installing-gcc30-on-solaris-8-intel/546.html