LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 12-05-2007, 06:14 PM   #1
snippy
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Rep: Reputation: 0
How do I Edit $PATH


Hello!

I have installed Solaris 10 and also some programs like wget and vim however, when I try to run them it says "not found".

I need to figure out how to edit the Path but I'm super confused about all the directories and I don't even know which ones I need to add to path.

The default was /usr/bin:/usr/ucb:/etc:.

I added usr/local/bin to the end of that in .profile using vi, but I'm not sure that even did anything! Or maybe that means the programs I downloaded are not located there. Please help if you can!

It is quite possible that this does not even make sense because I have never used this before and I don't have a clue what I am doing! Thanks for any advice! )
 
Old 12-05-2007, 06:21 PM   #2
crisostomo_enrico
Member
 
Registered: Dec 2005
Location: Madrid
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547

Rep: Reputation: 36
Well, you should know where those files were installed. If you don't, you can try to find them with find. Typical locations are:
/usr/sfw/bin
/usr/gnu/bin
/opt/csw/bin
/opt/sfw/bin
/usr/local/bin

Once you know the paths, .profile is a good option to set the path for your users. Path can be overridden also in /etc/default/login, which affects all the users.

Bye,
Enrico.
 
Old 12-05-2007, 07:37 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by snippy View Post
I need to figure out how to edit the Path but I'm super confused about all the directories and I don't even know which ones I need to add to path.

The default was /usr/bin:/usr/ucb:/etc:.

I added usr/local/bin to the end of that in .profile using vi, but I'm not sure that even did anything! Or maybe that means the programs I downloaded are not located there. Please help if you can!
After you change your path in .profile, you have to logout and log back in. If you only need the new version of the path in a shell, you can put the modification in .bashrc and open a new terminal window.
 
Old 12-05-2007, 07:52 PM   #4
snippy
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you so much for your help.

I used find to find the files...vim is located in usr/local

so I added that to my path in .profile (plus all the ones from the previous post)and now instead of the Not found error, I get one that says this (when i try to create a file using vim):

ld.so.1: vim: fatal: libncurses.so.5: open failed: No such file or directory
Killed

So obviously it is telling me that i am missing something.libncurses.so.5. At the risk of sounding silly, do you think that means that vim did not install correctly?

And also, thank you for the log out tip...i did not know that!
 
Old 12-06-2007, 02:14 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
This error means that this vim, which isn't part of Solaris, hasn't been installed or hasn't been built properly.

What says "ldd /usr/local/lib/vim" ?

If you have installed Solaris Expres Developer Edition or Sun Studio, you have a properly built vim bundled in /opt/SUNWspro/bin/gvim

Last edited by jlliagre; 12-06-2007 at 03:11 AM.
 
Old 12-06-2007, 10:57 AM   #6
snippy
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jlliagre View Post
This error means that this vim, which isn't part of Solaris, hasn't been installed or hasn't been built properly.

What says "ldd /usr/local/lib/vim" ?

If you have installed Solaris Expres Developer Edition or Sun Studio, you have a properly built vim bundled in /opt/SUNWspro/bin/gvim
aaah....okay. Thank you!
 
Old 12-06-2007, 12:04 PM   #7
snippy
LQ Newbie
 
Registered: Dec 2007
Posts: 12

Original Poster
Rep: Reputation: 0
btw, after the last post I went back to the download site and i thought you would like to know...if only to laugh, that the reason it was giving me an error is because i did not download the three dependencies that are required. I only downloaded two. Funny that i missed the one called curses.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
$PATH edit query johnpaulodonnell Linux - Newbie 1 08-29-2006 07:12 AM
edit value of PATH permanently rsumbeling Linux - General 2 12-13-2004 10:57 AM
How do I edit my path? Echo Kilo Linux - General 3 12-12-2004 01:50 PM
How to edit the value of $PATH? ICO Slackware 1 02-07-2004 04:38 AM
how do i edit my echo$PATH Laptop2250 Linux - Newbie 6 11-15-2003 11:33 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 03:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration