Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Using update-alternatives when deploying two versions of Qt on OpenSuse Linux
Forum Updated to NodeBB v4.3 + New Features

Using update-alternatives when deploying two versions of Qt on OpenSuse Linux

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 2 Posters 2.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    user100101
    wrote on last edited by
    #1

    I have version of Qt installed from repositories of OpenSuse Linux. But it lacks some of the Qt components and I needed to install SDK.
    When you install two versions of Qt on Linux you need to tell the system which compiler to use.
    I used the following command to add newer qmake as alternative to preinstalled qmake: "sudo update-alternatives --install /usr/bin/qmake qmake /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake 10"
    Command output:
    "Update-alternatives: warning: /etc/alternatives/qmake has been changed (manually or by a script). Switching to manual updates only.
    Update-alternatives: using /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake to provide /usr/bin/qmake (qmake) in auto mode.
    update-alternatives: warning: not replacing /usr/bin/qmake with a link"

    Problem is when I execute qmake still old version is used.

    Then I ran command "sudo update-alternatives --display qmake"
    Output: "qmake - auto mode
    Link currently points to /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake
    /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake - priority 10
    Current 'best' version is '/opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake' "

    I also get strange output from command: "sudo update-alternatives --config qmake"

    "There is only one alternative in link group qmake: /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake
    Nothing to configure.
    update-alternatives: warning: forcing reinstallation of alternative /opt/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake because link group qmake is broken.
    update-alternatives: warning: not replacing /usr/bin/qmake with a link"

    That's the point where I got stuck would like to ask for a help if somebody knows the question.

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi!
      Is all that really needed? Why not just call the right qmake?
      And in QtCreator you can define two Kits one for each Qt version.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      U 1 Reply Last reply
      0
      • jsulmJ jsulm

        Hi!
        Is all that really needed? Why not just call the right qmake?
        And in QtCreator you can define two Kits one for each Qt version.

        U Offline
        U Offline
        user100101
        wrote on last edited by
        #3

        @jsulm good idea, thanks!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved