Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-05-2010, 10:51 AM   #1
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Rep: Reputation: 18
Question want to set PATH for qt and having trouble

Hi i am a newbie !!
I have bash
I installed Qt libs and want to set environmental variable PATH, I tried some stuff from qt tutorials..
here is what i tried:
In .profile added the following lines:
 PATH=/path of bin:$PATH
 export PATH
and it does nothing
so i tried
then checked path
echo $PATH
Now there are two issues
1) the make gives error that header not found( probably make don't have the path)

2) when i closed the terminal and opened it again the PATH I newly entered was not there !!

thanks in advance !!!
Old 09-05-2010, 12:04 PM   #2
Registered: Feb 2006
Location: Ontario, Canada
Distribution: Debian, sometimes BSD.
Posts: 44
Blog Entries: 13

Rep: Reputation: 21
I would suggest that you try placing
PATH="/path of bin:$PATH"
export PATH
in "~/.bashrc".

Make sure that your .profile includes something to this affect:
# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
No doubt Ubuntu has setup their login process to be different from Debian, but this should work. If not, and it's a single-user computer, try placing the path in /etc/profile. Mine is set up like the following, but you should pay attention to how Ubuntu has structured things.
if [ "`id -u`" -eq 0 ]; then
export PATH
The reason your PATH change set through the cmd line didn't stay after restarting the terminal, is because changes made in that way will only stay in that session.

As for the make procedure, I haven't built Qt from source, so there you will have to check further into their documentation, but if there is a configure step, e.g.
$ configure --bin-directory=DIR --your-chosen switches
See whether you can utilise that method (Type
./configure --help
from the top-level source code directory.)

If I understand what you're trying to do with Qt, (You may be duplicating effort, but it's fun to experiment. ) you might also find the attached text file useful. It's info I compiled from various sources some time back. While it doesn't apply exactly to your situation, I suspect that the issue I had to overcome may be the same as what you're trying to do now. One thing I would add is, don't overwrite existing PATHs. Before making changes, check the output of
If nothing pops up, you're good. As you already know, otherwise be sure to add the original path in
$ export "$PATH:$NEW_PATH"
Good Luck!!
Attached Files
File Type: txt gtk2.10_with_Etch.txt (5.9 KB, 4 views)
Old 09-05-2010, 12:07 PM   #3
Senior Member
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 56
You might also want to post the contents of PKG_CONFIG_PATH:

This is where pkg-config (which make depends on) looks for the required headers and libraries.
Old 09-05-2010, 02:16 PM   #4
Registered: Jan 2010
Location: india/pune
Distribution: Arch Fedora20
Posts: 126

Original Poster
Rep: Reputation: 18
firstly thanks all !!
Unfortunately what ofaring said is not working , nothing is happening and path is still the same !!
is there any alternative way to install Qt automatically (like using synaptic)
is there any .deb package of Qt available which will perform the tasks such as setting the environmental variables etc.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
set up java_home path in /home/user/.bashrc but use path in /usr/lib/java vitalstrike82 Slackware 4 01-13-2009 11:25 PM
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 12:24 AM
How to set PATH How do I set PATH environment variable? Tranquil Linux - Newbie 3 11-02-2003 02:52 AM
$PATH!? how to set these PATH(s)!? sirpelidor Red Hat 5 10-25-2003 04:00 PM
How to set $PATH for RH 8 Quest Linux - Software 3 07-12-2003 10:58 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:23 PM.

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