setting environment variables
Hi,
I working with Fedora Core 5 and I am trying to install QT. I have done the installation and the next step is to update my environement variable. I am using bash. I looked at the online documentation and they said I need to add to my .profile the following: PATH=/usr/local/Trolltech/Qt-4.1.4/bin:$PATH export PATH I did so by adding it to different places: 1. /etc/profile 2. ~/.bashrc 3. /etc/bash when I type set, my PATH doesn't append the new string. What should I do? I am doing exactly as I am reading and it is not working! v333k |
After you've edited your .bash_profile or .profile, you need to use source, e.g. "source .bash_profile". Either file should be in your home directory, if not there you can create them. If you run set after that, you should see the changes.
Edit: see this post for a reason you should add it to .bash_profile instead of .bashrc. |
Simple add this line at the end of /etc/profile and relogin (Sometimes reboot might be required)
Code:
export PATH=$PATH:/usr/local/Trolltech/Qt-4.1.4/bin |
If you use source, you don't have to reboot or login again..
|
The changed path will exist in the shell where you sourced your profile, or ran "bash -l", however it won't change for other shells, such as when you click on an icon for a qt program. You need to log out and log in again to do that.
|
it works
Thanks! The "source" fixed it.
THanks again! v333k |
All times are GMT -5. The time now is 06:19 AM. |