Why isnt my PATH variable working?

Associate
Joined
26 Jun 2003
Posts
1,140
Location
North West
I have just installed a program here:

/usr/local/Trolltech/Qt-4.1.0/

and I need to set the environment variables in the /usr/local/Trolltech/Qt-4.1.0/bin directory which containts "qmake". I want to run this from any location on the computer.

I set the variable by:

PATH=/usr/local/Trolltech/Qt-4.1.1/bin:$PATH
export PATH

Then I type in qmake and it comes up with

bash: qmake: command not found

Anyone know why this isnt working???

(It was working the other day tho!)

Thx
 
what does echo $PATH output? You didn't edit the PATH variable of the root user and are running it as you (or vice versa?)
 
We spotted ikapod. Ill see if thats right when I boot into linux

qmake is in the directory and if i type "qmake" in the directory. It works fine...
 
I had a problem with qmake not being found, unless I did an
export PATH=$PATH:/usr/lib/qt3/bin
However, I know how to fix this!
after doing the above command,
env | grep PATH
Find the PATH variable and copy the whole thing (eg.
PATH=/home/eatmuchpie/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin)
Make sure that if it spans a few lines, that you get all of it. It should end in /usr/lib/qt3/bin, because of the export command.
Then type in:
kate ~/.bashrc
Then paste the at the bottom of the file. That did the job for me (I'm not sure if you need to reboot, but probably not).
FYI, I'm on suse 10.
 
Which file/files do I have to edit to export PATH's automatically on boot/login?

I can never remember....

Thx

btw Ikapod was right! Thx a lot.
 
Last edited:
JonD said:
Which file/files do I have to edit to export PATH's automatically on boot/login?

I can never remember....

~/.bashrc for your user account, /etc/bashrc for all user accounts (assuming you are using a Redhat-derivative distro and the bash shell) (there's also ~/.bash_profile and /etc/profile).

Thx

btw Ikapod was right! Thx a lot.

I did spot that in the original post but thought it would be pretty impossible to make the same typo twice :) Glad it was something simple and straightforward.
 
Back
Top Bottom