[Qt-creator] Installing Qt 4.6

Andre Poenitz andre.poenitz at mathematik.tu-chemnitz.de
Sat May 8 00:33:09 CEST 2010


On Fri, May 07, 2010 at 10:12:38PM +0200, Christophe Meessen wrote:
> Hello,

Hello Christophe.
 
> I had some problem to install Qt properly so it worked right out of the 
> box. Some required steps are missing on the download page.

The obvious "problem" on *nix is that it's near to impossible to give
detailed instructions on how to install something across a couple of
dozen UNIX varieties and a grand gross of Linux distributions.

> Here are the missing steps in case someone cares.
> 
> 1. Assume you downloaded the latest version of Qt, set it to executable 

Indeed.

> and sudo run it.

That's not needed and often enough not possible as non-priviledged users
typically cannot write to /opt/*.
 
> 2. I then define a symbolic link for easy upgrade : ln -s 
> /opt/qtsdk-xxx  /opt/qt
> 
> 3. Some environment variables need to be set. I use the system wide 
> profile to share it with other users:
>      sudo -s
>      cat > /etc/profile.d/qtconfig.sh << EOF
>      if [-d /opt/qt ]; then
>          export QTDIR="/opt/qt"
>          export PATH="$QTDIR/bin:$QTDIR/qt/bin:$PATH"
>          export QMAKESPEC="linux-g++"
>          export CC="gcc"
>      fi
>      EOF

Same here.

And no, neither QTDIR not QMAKESPEC need to be set. I even doubt CC is
needed. It makes things more convenient if qmake is in $PATH, but it's
definitely not needed either.
 
>      It may be required to logout and login for the profile to be taken 
> in account.
>      These instructions could be as well stored in the user .profile for 
> user specific setup.
> 
> 4. The debugger wont work if the following instructions are not applied. 

Not true in general.

> LD_LIBRARY_PATH is deprecated :

By whom?

>      sudo -s
>      echo "/opt/qt/lib" > /etc/ld.so.conf.d/qtlibs.conf
>      ldconfig

Not user-writable.
 
>      This requires administrator priviledges.

Correct.

> Don't know how to setup 
> library path for user specific environment.

Use LD_LIBRARY_PATH.

>      The ldconfig command can be called with the -v option and a grep Qt 
> to check if the Qt libraries are found.
> 
> I spend two days sorting this out. The qt installation process 
> description is laking these steps with the consequence that it won't be 
> possible to compile anything if step 3 is missing and it won't be 
> possible to debug anything if step 4 is missing. I hope this help people 
> enjoying discovering Qt impessive IDE and SDK.

I am not disputing that these instructions might have helped you, and I
certainly appreciate the effort to write them up and share them with
the audience, but really, none of these steps except the one for making
the downloaded file executable is needed in general.

Maybe we could start solving this riddle by figuring out what kind of
system you are using?

Andre'



More information about the Qt-creator-old mailing list