CentOS 8 is coming with Python 3. Seafile server version will support Python 3 with 7.1. So if you want, like me, install 7.0.5 on CentOS 8, you need install Python 2 packages and patch both setup-files for mysql-database (if you want setup MariaDB with script).
dnf install python2 pip2 install pymysql pip3 install pymysql
Edit setup-seafile-mysql.sh and comment on line 75 “check_python_module” out.
Edit setup-seafile-mysql.py and replace all MySQLdb with pymysql.
Scripts will now run fine.
Before you can start seahub, you need to patch also all files which use “MySQLdb”:
Assumed, you are at folder
for I in seahub/tools/batch-delete.py seahub/tools/avatar_migration.py seahub/thirdpart/sqlalchemy/dialects/mysql/mysqldb.py seahub/thirdpart/sqlalchemy/testing/suite/test_results.py seahub/thirdpart/openid/store/sqlstore.py seahub/thirdpart/django/contrib/gis/db/backends/mysql/introspection.py seahub/thirdpart/django/db/backends/mysql/base.py seahub/thirdpart/django/db/backends/mysql/introspection.py seahub/thirdpart/django/db/backends/mysql/schema.py seahub/thirdpart/wsgidav/addons/mysql_dav_provider.py; do sed -i 's/MySQLdb/pymysql/g' $I; done
Also needs to recompile a binary file:
cd seahub/thirdpart/django/db/backends/mysql/ python2 -m py_compile base.py
Now seahub can also start
But on browser I get only “site doesn’t work” Fixed… Apache-Listen-directive forgotten…