LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-18-2004, 07:40 PM   #1
cheezies
LQ Newbie
 
Registered: Jul 2004
Posts: 8

Rep: Reputation: 0
trouble installing Qt and setting up enviro variables


I was trying to install bbconf, but it needs the Qt library. So now I am trying to install Qt .

I'm a newbie and I'm stuck on the second step in the INSTALL document. I'm running Slackware 10.0 with 2.6.7.

I am not sure how exactly I can set enviroment variables using .profile or .login files.


2. Set some environment variables in the file .profile (or .login,
depending on your shell) in your home directory. Create the
file if it is not there already.

QTDIR - the directory in which you're building Qt
PATH - to locate the moc program and other Qt tools
MANPATH - to access the Qt man pages
LD_LIBRARY_PATH - for the shared Qt library

Note that under IRIX the additional LD_LIBRARYN32_PATH and
LD_LIBRARY64_PATH variables are used for specifying library
search paths. Set the variable that matches your configuration, or
see the rld(5) man page for more information.

This is done like this:

In .profile (if your shell is bash, ksh, zsh or sh), add the
following lines:

QTDIR=/usr/local/qt
PATH=$QTDIR/bin:$PATH
MANPATH=$QTDIR/doc/man:$MANPATH
LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

export QTDIR PATH MANPATH LD_LIBRARY_PATH

In .login (in case your shell is csh or tcsh), add the following lines:

setenv QTDIR /usr/local/qt
setenv PATH $QTDIR/bin:$PATH
setenv MANPATH $QTDIR/doc/man:$MANPATH
setenv LD_LIBRARY_PATH $QTDIR/lib:$LD_LIBRARY_PATH

After you have done this, you will need to login again, or
re-source the profile before continuing, so that at least $QTDIR
and $PATH are set. Without these the installation will halt with an error
message.

On AIX set LIBPATH and on HP-UX set SHLIB_PATH instead of LD_LIBRARY_PATH.

Note that the SGI MIPSpro o32 and Sun WorkShop 5.0 targets are no
longer supported as of Qt 3.3.
 
Old 07-19-2004, 12:00 AM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 53
Hi,

in your home directory is a file called
.bash_profile
that's where i put it
you could also use /etc/profile for global setting the Qt environment for all users
(adjust the path to fit your installation)
QTDIR=/opt/qt
edit the PATH string to include (along with everything else already there)
PATH entries are separated by a ":"
PATH=$QTDIR/bin
add QTDIR to the export line
export QTDIR
or if there is no export line each variable line must start with "export"
like:
export QTDIR=/opt/qt
save the file
forget the LD_LIBRARY_PATH
there is no reason not to use it but it's easier to do it the regular Linux way
put the full path to the Libs in
/etc/ld.so.conf
then as root run
ldconfig

do a
source ~/.bash_profile
to read in changes on the virtual terminal you are on
then
which moc
you should get back the path to the qt moc compiler.
then you are good to go

you might have to source the file in new term windows untill you reboot
or at least log all the way out and back in again.
 
Old 07-19-2004, 08:16 PM   #3
cheezies
LQ Newbie
 
Registered: Jul 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for the informative reply foo_bar_foo! I'll give that a try on my /etc/profile and report what happens.
 
  


Reply



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
setting env. variables arunsri Slackware 3 03-26-2005 05:49 AM
Need help setting environment variables. cottonmouth Linux - Newbie 3 12-09-2004 04:54 PM
setting environment variables durden2.0 Linux - Newbie 5 07-15-2003 01:57 PM
setting environment variables rezza Linux - Distributions 2 04-09-2003 08:21 AM
setting lynx variables sancho5 Linux - General 1 12-31-2001 09:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:12 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
Open Source Consulting | Domain Registration