Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt version is not properly installed error when changing the qt build location



  • Hi,

    The QT versions in kit works when I have the url same as my qt5-host custom installation directory(/home/username/machine1/qt5-host/bin/qmake)). When I change the username or folder name(machine2) of qt build location(to /home/username/machine2/qt5-host/bin/qmake), I am getting qt version is not properly installed error in the kits->qt version.

    Can someone tell me whats going on?

    I tried setting following in .profile and .bash but still getting same error.
    export QTDIR=/home/username/machine2/qt5-host
    export PATH="$QTDIR/bin:$PATH"
    export LD_LIBRARY_PATH="$QTDIR/lib:$LD_LIBRARY_PATH"

    The qmake --version shows the right version. and which qmake points to right location.


  • Lifetime Qt Champion

    Hi,

    Qt as internally some paths hardcoded. You can't just move stuff around like that.

    IIRC, the simplest is to add a qt.conf file in the bin folder of the Qt version you are moving.

    See here for more information about that file.



  • Hi SGaist,

    Thank you. I still don't have the qt creator working.

    This is my folder structure
    /home/username/machine1/qt5
    /home/username/machine1/qt5-host
    /home/username/machine1/rootfs

    I have qmake in qt5/bin. I put my qt.conf in there with
    [Paths]
    Prefix =/home/username/machine1/qt5
    Libraries=/home/username/machine1/qt5/lib
    Headers=/home/username/machine1/qt5/include

    After this Qt version in kits get recognised, but throws a warning No qmlscene installed.

    I tried to change the property of the qmake but it doesn't seems to change.
    qmake -set QMAKE_SPEC /home/username/nano/qt5-host/mkspecs/device" but it doesn't seem to change.
    I tried unset, still shows same value on query.
    Why is it not allowing me to change the properties? I can't compile application because mkspecs path error. Also get error Project ERROR: Cannot run target compiler target compiler path wrong.

    The folder structure was based on my compile configuration

    • sysroot /home/username/machine1/rootfs
    • prefix /usr/local/qt5
    • extprefix /home/username/machine1/qt5
    • hostprefix /home/username/machine1/qt5-host

Log in to reply