Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13208

Cannot import libmariadbclient.so.18 from python

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.23
    • Fix Version/s: 10.1.27
    • Component/s: Platform Debian
    • Labels:
      None
    • Environment:
      Debian Stretch

      Description

      Hi!

      I have some problems with MariaDB 10.1 (from your repositories). I can't use the python MySQLDb lib.

      I don't have any problems on Jessie (Debian or MariaDB repo) or Stretch (Debian repo).

      root@4cd9031401a8:/home/vagrant# dpkg -l | grep mariadb
      ii  libmariadb-dev              2.3.2-2                        amd64        MariaDB Connector/C, development files
      ii  libmariadb2:amd64           2.3.2-2                        amd64        MariaDB Connector/C
      ii  libmariadbclient18          10.1.23+maria-1~stretch        amd64        MariaDB database client library
      ii  mariadb-client-10.1         10.1.23+maria-1~stretch        amd64        MariaDB database client binaries
      ii  mariadb-client-core-10.1    10.1.23+maria-1~stretch        amd64        MariaDB database core client binaries
      ii  mariadb-common              10.1.23+maria-1~stretch        all          MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
      ii  mariadb-server              10.1.23+maria-1~stretch        all          MariaDB database server (metapackage depending on the latest version)
      ii  mariadb-server-10.1         10.1.23+maria-1~stretch        amd64        MariaDB database server binaries
      ii  mariadb-server-core-10.1    10.1.23+maria-1~stretch        amd64        MariaDB database core server files
       
      root@4cd9031401a8:/home/vagrant# apt-cache policy python-mysqldb
      python-mysqldb:
        Installed: 1.3.7-1.1
        Candidate: 1.3.7-1.1
        Version table:
       *** 1.3.7-1.1 500
              500 http://deb.debian.org/debian stretch/main amd64 Packages
              100 /var/lib/dpkg/status
       
       
       
      root@4cd9031401a8:/home/vagrant# mysql --version
      mysql  Ver 15.1 Distrib 10.1.23-MariaDB, for debian-linux-gnu (x86_64) using readline 5.
       
      root@4cd9031401a8:/home/vagrant# apt-cache policy mariadb-common
      mariadb-common:
        Installed: 10.1.23+maria-1~stretch
        Candidate: 10.1.23+maria-1~stretch
        Version table:
       *** 10.1.23+maria-1~stretch 500
              500 http://ftp.igh.cnrs.fr/pub/mariadb/repo/10.1/debian stretch/main amd64 Packages
              100 /var/lib/dpkg/status
           10.1.23-9+deb9u1 500
              500 http://deb.debian.org/debian stretch/main amd64 Packages
       
       
      root@4cd9031401a8:/home/vagrant# lsb_release -av
      No LSB modules are available.
      Distributor ID:	Debian
      Description:	Debian GNU/Linux 9.0 (stretch)
      Release:	9.0
      Codename:	stretch
       
       
      root@4cd9031401a8:/home/vagrant# python -c "import MySQLdb"
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 19, in <module>
          import _mysql
      ImportError: libmariadbclient.so.18: cannot open shared object file: No such file or directory
      
      

      We can bypass the problem by importing latest version of the lib with pip.

      root@4cd9031401a8:/home/vagrant# python
      Python 2.7.13 (default, Jan 19 2017, 14:48:08) 
      [GCC 6.3.0 20170118] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import MySQLdb
      >>> print MySQLdb.__version__
      1.3.10
      
      

      Cheers!

      Emilien

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              hanx Emilien Mantel
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: