Konact / KMail 不想再启动了,因为 Akonadi 失败了。我无法启动 akonadi
~$ akonadictl --verbose start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
org.kde.pim.akonadiserver: Starting up the Akonadi Server...
org.kde.pim.akonadiserver: Found mysql_install_db: "/usr/bin/mysql_install_db"
org.kde.pim.akonadiserver: Found mysqlcheck: "/usr/bin/mysqlcheck"
org.kde.pim.akonadiserver: Using mysqld: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadicontrol: Service ":1.89" owner changed from "" to ":1.89"
org.kde.pim.akonadicontrol: Service ":1.90" owner changed from "" to ":1.90"
org.kde.pim.akonadiserver: mysqld reports version 10.3.34 (MariaDB)
org.kde.pim.akonadiserver: Executing: "/usr/sbin/mysqld-akonadi" "--defaults-file=/home/raeg/.local/share/akonadi/mysql.conf --datadir=/home/raeg/.local/share/akonadi/db_data/ --socket=/run/user/1000/akonadi/mysql.socket --pid-file=/run/user/1000/akonadi/mysql.pid"
org.kde.pim.akonadiserver: database server stopped unexpectedly
org.kde.pim.akonadiserver: Database process exited unexpectedly during initial connection!
org.kde.pim.akonadiserver: executable: "/usr/sbin/mysqld-akonadi"
org.kde.pim.akonadiserver: arguments: ("--defaults-file=/home/raeg/.local/share/akonadi/mysql.conf", "--datadir=/home/raeg/.local/share/akonadi/db_data/", "--socket=/run/user/1000/akonadi/mysql.socket", "--pid-file=/run/user/1000/akonadi/mysql.pid")
org.kde.pim.akonadiserver: stdout: ""
org.kde.pim.akonadiserver: stderr: "2022-05-10 15:12:03 0 [Note] /usr/sbin/mysqld-akonadi (mysqld 10.3.34-MariaDB-0ubuntu0.20.04.1) starting as process 7312 ...\n"
org.kde.pim.akonadiserver: exit code: 1
org.kde.pim.akonadiserver: process error: "Unknown error"
org.kde.pim.akonadiserver: terminating connection threads
org.kde.pim.akonadiserver: terminating service threads
org.kde.pim.akonadiserver: stopping db process
org.kde.pim.akonadiserver: Failed to remove runtime connection config file
org.kde.pim.akonadiserver: Shutting down AkonadiServer...
org.kde.pim.akonadicontrol: Service ":1.90" owner changed from ":1.90" to ""
org.kde.pim.akonadicontrol: Application '/usr/bin/akonadiserver' exited normally...
尝试更新 MariaDB
我读到,我应该更新 MariaDB,但我不知道如何。
~$ sudo systemctl restart mariadb
Failed to restart mariadb.service: Unit mariadb.service not found.
~$ sudo mysql_upgrade
Reading datadir from the MariaDB server failed. Got the following error when executing the 'mysql' command line client
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
FATAL ERROR: Upgrade failed
~$ sudo mariadb-upgrade
sudo: mariadb-upgrade: Command not found
~$ mariadb --version
mariadb Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
然后我跑了
curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.8
sudo apt update && sudo apt upgrade -y
~$ mariadb --version
mariadb Ver 15.1 Distrib 10.3.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
但正如人们所看到的,这并没有太大变化。
我读到https://bbs.archlinux.org/viewtopic.php?id=184192,更新到 MariaDB 版本 10 可能是问题所在。它建议降级,然后做一些事情,然后再次升级。但是,那篇文章是 2014 年的,所以我不确定它是否仍然适用。
应用装甲
根据升级到 Ubuntu 20.04.2 LTS 会破坏 Akonadi,因此 KMail可能是 apparmor 的问题,所以我跑了
sudo systemctl disable apparmor
并重新启动,但这并没有帮助。
我能做些什么?
我尝试了 Make42 的答案,但一开始没有用。然后我编辑
/root/.local/share/akonadi/mysql.conf
并添加了这一行在
[mysqld]
节中。然后akonadictl start
工作了。我不知道为什么,但这有助于:
~/.local/share/akonadi/mysql.conf
为~/.local/share/akonadi/mysql.conf_backup
.akonadictl start
。该文件
mysql.conf
已重新创建(与原始文件相同mysql.conf_backup
),现在一切正常。