Unable to install Seafile on Debian 9; says it requires "python-mysqldb" but it is already installed

I am trying to install 6.1.2 on Debian 9.

python2 is default, python3 is also installed. MariaDB 10.2 installed.

Running setup-seafile-mysql.sh says it required python-mysqldb.

But it is already installed:

apt-get install python-mysqldb

Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-mysqldb is already the newest version (1.3.7-1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded

./setup-seafile-mysql.sh

Checking python on this machine ...
  Checking python moduln/Ubuntu:
e: setuptools ... Done.
  Checking python module: python-imaging ... Done.
  Checking python module: python-mysqldb ... 
 python-mysqldb  is not installed, Please install it first.

On Debian/Ubuntu:

sudo apt-get install python-mysqldb

How to solve this? :worried:

EDIT:
python setup-seafile-mysql.py

Traceback (most recent call last):
  File "setup-seafile-mysql.py", line 20, in <module>
    import MySQLdb
  File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 19, in <module>
    import _mysql
ImportError: /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18: version `libmariadbclient_18' not found (required by /usr/lib/python2.7/dist-packages/_mysql.x86_64-linux-gnu.so)

libmariadbclient18 is also installed.

I will save you a lot of time. This happend to me month ago. Problem is in mariaDB package and they still didn’t fix it.

  1. Backup your database over mysqldump (all of the tables)
  2. Uninstall MariaDB
  3. Remove MariaDB official repository (and update APT)
  4. Install MariaDB from Debian repos (10.1)

Than it will work

3 Likes

Thank you!!! This solved my issue.

1 Like