[CentOS] Installed program not found

Steve Huff shuff at vecna.org
Mon Aug 1 16:41:03 UTC 2005


On Aug 1, 2005, at 12:20 PM, Dave Gutteridge wrote:

> Great! Thank you. Turns out it was in /usr/bin/local.
> I would have thought /usr/bin/local would be on the default path.  
> Can I set it to be?

do you mean /usr/local/bin?  /usr/bin/local is pretty nonstandard.

SIMPLE ANSWER: set your $PATH environment variable in ~/.profile.   
this command will do it:

echo "export PATH=$PATH:/usr/local/bin" >> ~/.profile

close your terminal window, open a new one, and you're good to go.

MORE COMPLEX ANSWER: the simple answer only sets this variable for  
one user, you.  Red Hat provides you will a straightforward facility  
for setting the variable for all users on the system: the /etc/ 
profile.d directory.

look in /etc/profile.d - you'll find a number of files called  
something.sh and something.csh.  each of the something.sh files are  
written in Bourne shell syntax and will be read by bash/ksh when they  
initialize; the something.csh files are written in C shell syntax and  
will be read by tcsh/csh when they initialize.  you could create a  
file called path.sh that looked something like this:

# path customizations
export PATH=$PATH:/usr/local/bin

and another called path.csh that looked something like this:

# path customizations
setenv PATH "$PATH:/usr/local/bin"

and then all new instances of shells systemwide would adopt the new  
settings.  also, since these new files you'd create would not be  
owned by any package, you shouldn't have to worry about them being  
clobbered during software updates.

-steve

p.s. one tip that may save you a long "find /" in the future; rpm -ql  
<packagename> gives you a list of all files contained in a given  
package.  "rpm -ql wacom | grep wacomcpl" might have been a quicker  
route to success (assuming the wacom package was named something like  
wacom.x.y-z.i386.rpm)

---
If this were played upon a stage now, I could condemn it as an  
improbable fiction. - Fabian, Twelfth Night, III,v




More information about the CentOS mailing list