Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24th April 2012, 04:00 PM
farmkid Offline
Registered User
 
Join Date: Jul 2009
Posts: 28
linuxchrome
problem with PATH variable

Some programs I use for work are installed on /opt/454, and the executables are in /opt/454/bin. The installation instructions also suggest adding that directory to the PATH for obvious reasons, which I usually do. With my latest installation (since installing F16, I think), however, that doesn't seem to work. I added /opt/454/bin to my .bash_profile file, and the directory is in the PATH, but when I try to call any of those programs, it doesn't work. Instead, I have to add the directory to the PATH every time I want to use one of those programs if I haven't done it since the last time I opened terminal.

Here is my .bash_profile file:

Code:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin:opt/454/bin

export PATH
And here is what I get when I check the PATH:
Code:
[AT@AT ~]$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/AT/.local/bin:/home/AT/bin:opt/454/bin
Yet, to use one of the programs at that location, I have to
Code:
[AT@AT ~]$ PATH=$PATH:/opt/454/bin
[AT@AT ~]$ export $PATH
bash: export: `/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/AT/.local/bin:/home/AT/bin:opt/454/bin:/opt/454/bin': not a valid identifier
And now those programs will work until I close the terminal and/or open a new terminal.

Any idea why this is, and how I can make it work properly?

Last edited by farmkid; 24th April 2012 at 04:30 PM.
Reply With Quote
  #2  
Old 24th April 2012, 04:13 PM
aleph's Avatar
aleph Offline
Banned (for/from) behaving just like everybody else!
 
Join Date: Jul 2007
Location: Beijing, China
Posts: 1,307
linuxfirefox
Re: problem with PATH variable

export PATH, not $PATH.

Also check the last directory path in the .bash_profile file. You forgot the slash (/) before "opt".
__________________
I believe in nerditarianism. I read FedoraForum for the Fedora-related posts.
Reply With Quote
  #3  
Old 24th April 2012, 04:27 PM
farmkid Offline
Registered User
 
Join Date: Jul 2009
Posts: 28
linuxchrome
Re: problem with PATH variable

Well, that was easy. I figured it was something simple and I was just making a stupid mistake. I'm a little surprised I didn't notice the missing /, but there you go. Thanks for finding my error.
Reply With Quote
Reply

Tags
path, problem, variable

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PATH variable gbaldeck Using Fedora 3 27th February 2010 08:26 PM
path variable michaelcarlson Using Fedora 2 14th August 2006 03:02 PM
In FC4 where is the $PATH variable set. d2e2 Using Fedora 12 18th September 2005 06:02 PM
$PATH variable fkar Using Fedora 6 1st February 2005 03:41 PM
PATH Variable flyer2000 Using Fedora 4 25th September 2004 05:29 PM


Current GMT-time: 04:41 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat