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. QMYSQL driver not loaded on Ubuntu
Forum Updated to NodeBB v4.3 + New Features

QMYSQL driver not loaded on Ubuntu

Scheduled Pinned Locked Moved Solved Installation and Deployment
61 Posts 5 Posters 82.1k Views 2 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #18

    [quote author="SGaist" date="1388788157"]You already have all the information: call "ldd /opt/Qt5.2.0/5.2.0/gcc_64/plugins/sqldrivers/libqsqlmysql.so"

    to see what libraries it links to[/quote]

    This is :

    root@Gigabyte-Z68P-DS3:~# ldd /opt/Qt5.2.0/5.2.0/gcc_64/plugins/sqldrivers/libqsqlmysql.so
    linux-vdso.so.1 => (0x00007fff2c89b000)
    libmysqlclient_r.so.16 => not found
    libQt5Sql.so.5 => /opt/Qt5.2.0/5.2.0/gcc_64/plugins/sqldrivers/../../lib/libQt5Sql.so.5 (0x00007f23cac7a000)
    libQt5Core.so.5 => /opt/Qt5.2.0/5.2.0/gcc_64/plugins/sqldrivers/../../lib/libQt5Core.so.5 (0x00007f23ca5ac000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f23ca2a8000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f23c9ee0000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f23c9cc2000)
    libicui18n.so.51 => /opt/Qt5.2.0/5.2.0/gcc_64/plugins/sqldrivers/../../lib/libicui18n.so.51 (0x00007f23c98a9000)
    libicuuc.so.51 => /opt/Qt5.2.0/5.2.0/gcc_64/plugins/sqldrivers/../../lib/libicuuc.so.51 (0x00007f23c9523000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f23c931e000)
    libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007f23c911c000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f23c8f14000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f23c8c12000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f23c890e000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f23c86f8000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f23cb0ec000)
    libicudata.so.51 => /opt/Qt5.2.0/5.2.0/gcc_64/plugins/sqldrivers/../../lib/libicudata.so.51 (0x00007f23c6fae000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f23c6d6f000)
    root@Gigabyte-Z68P-DS3:~#

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #19

      You have it on the second line:

      @libmysqlclient_r.so.16 => not found@

      Check what version number of libmysqlclient_r you have installed

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #20

        [quote author="SGaist" date="1388870467"]You have it on the second line:

        @libmysqlclient_r.so.16 => not found@

        Check what version number of libmysqlclient_r you have installed[/quote]

        root@Gigabyte-Z68P-DS3:~# dpkg --get-selections | grep mysql
        libmysql++-dev install
        libmysql++3 install
        libmysqlclient-dev install
        libmysqlclient18:amd64 install
        libmysqlclient18:i386 install
        libmysqlcppconn-dev install
        libmysqlcppconn7 install
        libqt4-sql-mysql:amd64 install
        libqt4-sql-mysql:i386 install
        libqt5sql5-mysql:amd64 install
        mysql-client-core-5.5 install
        mysql-common install
        root@Gigabyte-Z68P-DS3:~#

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by SGaist
          #21

          You have the version 18 and not the 16.

          So two solutions here:

          1. find the version 16
          2. build the Qt MySQL plugin yourself with this version of the client library (best)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #22

            [quote author="SGaist" date="1388875572"]You have the version 18 and not the 16.

            So two solutions here:

            find the version 16

            build the Qt MySQL plugin yourself with this version of the client library (best)[/quote]

            Sorry , but can you help me for find or build qt mysql plugin ?
            I run this command : root@Gigabyte-Z68P-DS3:/opt/Qt5.2.0/5.2.0/Src/qtbase/src/plugins/sqldrivers/mysql# qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient_r" mysql.pro

            I think my command is not true ! in QT 5.2 any folders and roots is different...

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #23

              did you call make after that ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #24

                I run first this command : root@Gigabyte-Z68P-DS3:~# cd /opt/Qt5.2.0/5.2.0/Src/qtbase/src/plugins/sqldrivers/mysql

                after :

                root@Gigabyte-Z68P-DS3:/opt/Qt5.2.0/5.2.0/Src/qtbase/src/plugins/sqldrivers/mysql# qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/mysql -lmysqlclient_r" mysql.pro
                qmake: could not find a Qt installation of ''
                root@Gigabyte-Z68P-DS3:/opt/Qt5.2.0/5.2.0/Src/qtbase/src/plugins/sqldrivers/mysql#

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #25

                  Are you sure you are using the right qmake ?

                  Also, why are you developing as root ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #26

                    [quote author="SGaist" date="1388958771"]Are you sure you are using the right qmake ?

                    Also, why are you developing as root ?[/quote]

                    I,m not sure ! for this reason I need to help. :D

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #27

                      what does qmake --version and which qmake return ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • ? Offline
                        ? Offline
                        A Former User
                        wrote on last edited by
                        #28

                        [quote author="SGaist" date="1389045618"]what does qmake --version and which qmake return ?[/quote]

                        root@Gigabyte-Z68P-DS3:~# dpkg --get-selections | grep qmake
                        qt5-qmake install

                        and return : qmake: could not find a Qt installation of ''

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #29

                          Check what other Qt 5 package you have installed

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • ? Offline
                            ? Offline
                            A Former User
                            wrote on last edited by
                            #30

                            Please see this :

                            root@Gigabyte-Z68P-DS3:~# dpkg --get-selections | grep qt
                            appmenu-qt install
                            appmenu-qt5 install
                            checkbox-qt install
                            libaccounts-qt5-1 install
                            libdbusmenu-qt2:amd64 install
                            libdbusmenu-qt2:i386 install
                            libdbusmenu-qt5:amd64 install
                            libqt4-dbus:amd64 install
                            libqt4-dbus:i386 install
                            libqt4-declarative:amd64 install
                            libqt4-declarative:i386 install
                            libqt4-designer:amd64 install
                            libqt4-help:amd64 install
                            libqt4-network:amd64 install
                            libqt4-network:i386 install
                            libqt4-opengl:amd64 install
                            libqt4-opengl:i386 install
                            libqt4-script:amd64 install
                            libqt4-script:i386 install
                            libqt4-scripttools:amd64 install
                            libqt4-sql:amd64 install
                            libqt4-sql:i386 install
                            libqt4-sql-mysql:amd64 install
                            libqt4-sql-mysql:i386 install
                            libqt4-sql-sqlite:amd64 install
                            libqt4-svg:amd64 install
                            libqt4-test:amd64 install
                            libqt4-webkit install
                            libqt4-xml:amd64 install
                            libqt4-xml:i386 install
                            libqt4-xmlpatterns:amd64 install
                            libqt4-xmlpatterns:i386 install
                            libqt53d5:amd64 install
                            libqt5core5:amd64 install
                            libqt5dbus5:amd64 install
                            libqt5gui5:amd64 install
                            libqt5location5:amd64 install
                            libqt5network5:amd64 install
                            libqt5opengl5:amd64 install
                            libqt5printsupport5:amd64 install
                            libqt5qml5:amd64 install
                            libqt5quick5:amd64 install
                            libqt5sensors5:amd64 install
                            libqt5sql5:amd64 install
                            libqt5sql5-mysql:amd64 install
                            libqt5sql5-sqlite:amd64 install
                            libqt5test5:amd64 install
                            libqt5v8-5:amd64 install
                            libqt5webkit5:amd64 install
                            libqt5widgets5:amd64 install
                            libqt5xml5:amd64 install
                            libqtassistantclient4:amd64 install
                            libqtcore4:amd64 install
                            libqtcore4:i386 install
                            libqtgui4:amd64 install
                            libqtgui4:i386 install
                            libqtwebkit4:amd64 install
                            libqtwebkit4:i386 install
                            libsignon-qt5-1 install
                            python-qt4 install
                            python-qt4-dbus install
                            qt-at-spi:amd64 install
                            qt5-qmake install
                            qtchooser install
                            sni-qt:amd64 install
                            sni-qt:i386 install
                            ubuntu-sso-client-qt install
                            ubuntuone-control-panel-qt install
                            root@Gigabyte-Z68P-DS3:~#

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #31

                              Do you also have the dev package installed ?

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • ? Offline
                                ? Offline
                                A Former User
                                wrote on last edited by
                                #32

                                here :

                                root@Gigabyte-Z68P-DS3:~# dpkg --get-selections | grep dev

                                comerr-dev install
                                dpkg-dev install
                                freeglut3-dev:amd64 install
                                gir1.2-gudev-1.0 install
                                krb5-multidev install
                                libalut-dev install
                                libasprintf-dev:amd64 install
                                libboost1.53-dev:amd64 install
                                libc-dev-bin install
                                libc6-dev:amd64 install
                                libdevmapper-event1.02.1:amd64 install
                                libdevmapper1.02.1:amd64 install
                                libdrm-dev:amd64 install
                                libfreetype6-dev install
                                libgcc-4.8-dev:amd64 install
                                libgettextpo-dev:amd64 install
                                libgfortran-4.8-dev:amd64 install
                                libgl1-mesa-dev install
                                libgl2ps-dev install
                                libglu1-mesa-dev install
                                libgudev-1.0-0:amd64 install
                                libice-dev:amd64 install
                                libimobiledevice4 install
                                libkrb5-dev install
                                libmtdev1:amd64 install
                                libmysql++-dev install
                                libmysqlclient-dev install
                                libmysqlcppconn-dev install
                                libopenal-dev:amd64 install
                                libpcre3-dev:amd64 install
                                libpthread-stubs0-dev:amd64 install
                                libroot-core-dev install
                                libroot-geom-dev install
                                libroot-graf2d-gpad-dev install
                                libroot-graf2d-graf-dev install
                                libroot-graf3d-gl-dev install
                                libroot-gui-dev install
                                libroot-hist-dev install
                                libroot-io-dev install
                                libroot-math-mathcore-dev install
                                libroot-math-matrix-dev install
                                libroot-net-dev install
                                libroot-proof-dev install
                                libroot-tree-dev install
                                libsm-dev:amd64 install
                                libssl-dev:amd64 install
                                libstdc++-4.8-dev:amd64 install
                                libudev1:amd64 install
                                libudev1:i386 install
                                libv4l-dev:amd64 install
                                libx11-dev:amd64 install
                                libx11-xcb-dev install
                                libxau-dev:amd64 install
                                libxcb-dri2-0-dev:amd64 install
                                libxcb-glx0-dev:amd64 install
                                libxcb1-dev:amd64 install
                                libxdamage-dev:amd64 install
                                libxdmcp-dev:amd64 install
                                libxext-dev:amd64 install
                                libxfixes-dev:amd64 install
                                libxpm-dev:amd64 install
                                libxt-dev:amd64 install
                                libxxf86vm-dev:amd64 install
                                linux-libc-dev:amd64 install
                                makedev install
                                manpages-dev install
                                mesa-common-dev install
                                python-dbus-dev install
                                system-config-printer-udev install
                                udev install
                                unity-scope-devhelp install
                                x11proto-core-dev install
                                x11proto-damage-dev install
                                x11proto-dri2-dev install
                                x11proto-fixes-dev install
                                x11proto-gl-dev install
                                x11proto-input-dev install
                                x11proto-kb-dev install
                                x11proto-xext-dev install
                                x11proto-xf86vidmode-dev install
                                xserver-xorg-input-evdev install
                                xserver-xorg-video-fbdev install
                                xtrans-dev install
                                zlib1g-dev:amd64 install
                                root@Gigabyte-Z68P-DS3:~#

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #33

                                  I don't see any Qt related dev package

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  0
                                  • ? Offline
                                    ? Offline
                                    A Former User
                                    wrote on last edited by
                                    #34

                                    How can I install Qt related dev package ?

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #35

                                      IIRC you can install qt5-default then the same qt5 packages with a trailing -dev in the name

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • ? Offline
                                        ? Offline
                                        A Former User
                                        wrote on last edited by
                                        #36

                                        See now i installed qt dev package :

                                        ...
                                        ...
                                        qtbase5-dev:amd64 install
                                        qtbase5-dev-tools install
                                        qtdeclarative5-dev install

                                        Check latest lines...

                                        root@Gigabyte-Z68P-DS3:~# aptitude show qt5-default
                                        Package: qt5-default
                                        State: installed
                                        Automatically installed: no
                                        Multi-Arch: same
                                        Version: 5.0.2+dfsg1-7ubuntu11.1
                                        Priority: optional
                                        Section: libs
                                        Maintainer: Ubuntu Developers ubuntu-devel-discuss@lists.ubuntu.com
                                        Architecture: amd64
                                        Uncompressed Size: 93.2 k
                                        Depends: qtbase5-dev, qtchooser
                                        Suggests: qt5-qmake, qtbase5-dev-tools
                                        Conflicts: qt4-default, qt4-default
                                        Breaks: qt5-default (!= 5.0.2+dfsg1-7ubuntu11.1)
                                        Replaces: qt5-default (< 5.0.2+dfsg1-7ubuntu11.1)
                                        Provides: qt-default
                                        Description: Qt 5 development defaults package
                                        Qt is a cross-platform C++ application framework. Qt's primary feature is its rich set of widgets
                                        that provide standard GUI functionality.

                                        This package sets Qt 5 to be the default Qt version to be used when using development binaries like
                                        qmake. It provides a default configuration for qtchooser, but does not prevent alternative Qt
                                        installations from being used.
                                        Homepage: http://qt-project.org/

                                        root@Gigabyte-Z68P-DS3:~# dpkg --get-selections | grep dev
                                        comerr-dev install
                                        dpkg-dev install
                                        freeglut3-dev:amd64 install
                                        gir1.2-gudev-1.0 install
                                        krb5-multidev install
                                        libalut-dev install
                                        libasprintf-dev:amd64 install
                                        libboost1.53-dev:amd64 install
                                        libc-dev-bin install
                                        libc6-dev:amd64 install
                                        libdevmapper-event1.02.1:amd64 install
                                        libdevmapper1.02.1:amd64 install
                                        libdrm-dev:amd64 install
                                        libfreetype6-dev install
                                        libgcc-4.8-dev:amd64 install
                                        libgettextpo-dev:amd64 install
                                        libgfortran-4.8-dev:amd64 install
                                        libgl1-mesa-dev install
                                        libgl2ps-dev install
                                        libglu1-mesa-dev install
                                        libgudev-1.0-0:amd64 install
                                        libice-dev:amd64 install
                                        libimobiledevice4 install
                                        libkrb5-dev install
                                        libmtdev1:amd64 install
                                        libmysql++-dev install
                                        libmysqlclient-dev install
                                        libmysqlcppconn-dev install
                                        libopenal-dev:amd64 install
                                        libpcre3-dev:amd64 install
                                        libpthread-stubs0-dev:amd64 install
                                        libqt5opengl5-dev:amd64 install
                                        libroot-core-dev install
                                        libroot-geom-dev install
                                        libroot-graf2d-gpad-dev install
                                        libroot-graf2d-graf-dev install
                                        libroot-graf3d-gl-dev install
                                        libroot-gui-dev install
                                        libroot-hist-dev install
                                        libroot-io-dev install
                                        libroot-math-mathcore-dev install
                                        libroot-math-matrix-dev install
                                        libroot-net-dev install
                                        libroot-proof-dev install
                                        libroot-tree-dev install
                                        libsm-dev:amd64 install
                                        libssl-dev:amd64 install
                                        libstdc++-4.8-dev:amd64 install
                                        libudev1:amd64 install
                                        libudev1:i386 install
                                        libv4l-dev:amd64 install
                                        libx11-dev:amd64 install
                                        libx11-xcb-dev install
                                        libxau-dev:amd64 install
                                        libxcb-dri2-0-dev:amd64 install
                                        libxcb-glx0-dev:amd64 install
                                        libxcb1-dev:amd64 install
                                        libxdamage-dev:amd64 install
                                        libxdmcp-dev:amd64 install
                                        libxext-dev:amd64 install
                                        libxfixes-dev:amd64 install
                                        libxpm-dev:amd64 install
                                        libxt-dev:amd64 install
                                        libxxf86vm-dev:amd64 install
                                        linux-libc-dev:amd64 install
                                        makedev install
                                        manpages-dev install
                                        mesa-common-dev install
                                        python-dbus-dev install
                                        qtbase5-dev:amd64 install
                                        qtbase5-dev-tools install
                                        qtdeclarative5-dev install
                                        system-config-printer-udev install
                                        udev install
                                        unity-scope-devhelp install
                                        x11proto-core-dev install
                                        x11proto-damage-dev install
                                        x11proto-dri2-dev install
                                        x11proto-fixes-dev install
                                        x11proto-gl-dev install
                                        x11proto-input-dev install
                                        x11proto-kb-dev install
                                        x11proto-xext-dev install
                                        x11proto-xf86vidmode-dev install
                                        xserver-xorg-input-evdev install
                                        xserver-xorg-video-fbdev install
                                        xtrans-dev install
                                        zlib1g-dev:amd64 install
                                        root@Gigabyte-Z68P-DS3:~#

                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #37

                                          Did you retry to run qmake now ?

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          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