LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-05-2010, 11:51 AM   #1
rhklinux
Member
 
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:
Code:
In .profile added the following lines:
 PATH=/path of bin:$PATH
 export PATH
and it does nothing
so i tried
Code:
PATH=$PATH:/usr/local/qt-everywhere-opensource-src-4.6.3/bin
then checked path
Code:
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/qt-everywhere-opensource-src-4.6.3/bin
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, 01:04 PM   #2
ofaring
Member
 
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
Code:
PATH="/path of bin:$PATH"
export PATH
in "~/.bashrc".

Make sure that your .profile includes something to this affect:
Code:
# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi
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.
Code:
if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:$HOME/bin"
fi
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.
Code:
$ configure --bin-directory=DIR --your-chosen switches
See whether you can utilise that method (Type
Code:
./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
Code:
echo $VARIABLE_YOU_ARE_LOOKING_FOR
If nothing pops up, you're good. As you already know, otherwise be sure to add the original path in
Code:
$ 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, 01:07 PM   #3
Kenny_Strawn
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:

Code:
echo $PKG_CONFIG_PATH
This is where pkg-config (which make depends on) looks for the required headers and libraries.
 
Old 09-05-2010, 03:16 PM   #4
rhklinux
Member
 
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.
 
  


Reply


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-14-2009 12:25 AM
Set the path systemwide/Set the path for a user with Slackware jayhel Slackware 1 06-12-2005 01:24 AM
How to set PATH How do I set PATH environment variable? Tranquil Linux - Newbie 3 11-02-2003 03:52 AM
$PATH!? how to set these PATH(s)!? sirpelidor Red Hat 5 10-25-2003 05:00 PM
How to set $PATH for RH 8 Quest Linux - Software 3 07-12-2003 11:58 AM


All times are GMT -5. The time now is 04:24 PM.

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