KDE Kontact 應用程序無法啟動。Akonadi 個人資訊管理服務無法執行
在尋找一套好的郵件/聯繫人/日曆 .etc 應用程序時,我嘗試了 KDE 的Kontact,並在啟動幾乎所有捆綁的應用程序(kmail、korganiser .etc)時遇到了以下問題。應用程序會顯示一個像圖像 1 一樣的載入螢幕,然後它會在圖像 2 中顯示錯誤,說
The Akonadi personal information management service is not operational.
或類似的東西。這是我提供的系統資訊
screenfetch
:OS: KDE neon 5.12 Kernel: x86_64 Linux 4.13.0-45-generic Uptime: 4h 37m Packages: 2060 Shell: bash 4.3.48 Resolution: 1280x800 DE: KDE 5.47.0 / Plasma 5.13.1 WM: KWin GTK Theme: Breeze [GTK2/3] Icon Theme: breeze Font: Noto Sans Regular CPU: Intel Core2 Duo P8700 @ 2x 2.534GHz [36.0°C] GPU: intel RAM: 1802MiB / 2946MiB
我已經嘗試解除安裝(並重新安裝)Kontact 套件(無論是否
--purge
帶有apt
和由於某種原因,當我點擊錯誤螢幕上提供的“詳細資訊”按鈕時,它似乎沒有任何作用。我已經將自檢報告文件保存到我的桌面,然後忘記了它(我的編輯)。
解決方案
錯誤日誌顯示這些 K* 應用程序所需的伺服器的 akonadi 版本
mysql
正在嘗試訪問,~/.local/share/akonadi/db_data/
但db_data
不存在,因此它會拋出一個錯誤touch ~/nonexistent_dir/file.txt
。要解決,只需執行以下命令。
cd ~/.local/share/akonadi/; mkdir db_data
解釋
在網際網路上進行了大量探勘之後(有大量資訊,但其中大部分是關於 Akonadi 類似但不相同的問題的不完整/未解決的論壇主題),我能夠從 KDE 中找到Akonadi的一般摘要,其中是我自己調查的一個很好的開始。
玩弄了連結中提到的命令後,我得到了以下輸出(我的編輯):
$ akonadictl start $ Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString) mysqld: [ERROR] Could not open required defaults file: /home/[my username]/.config/akonadi/ mysqld: [ERROR] Fatal error in defaults handling. Program aborted! 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/[my username]/.local/share/akonadi/mysql.conf", "--datadir=/home/[my username]/.local/share/akonadi/db_data/", "--socket=/tmp/akonadi-[my username].UXCgLp/mysql.socket", "--pid-file=/tmp/akonadi-[my username].UXCgLp/mysql.pid") org.kde.pim.akonadiserver: stdout: "" org.kde.pim.akonadiserver: stderr: "mysqld: Can't change dir to '/home/[my username]/.local/share/akonadi/db_data/' (Errcode: 2 - No such file or directory)\n2018-06-21T19:34:18.989616Z 0 [Warning] The syntax '--log_warnings/-W' is deprecated and will be removed in a future release. Please use '--log_error_verbosity' instead.\n2018-06-21T19:34:18.989703Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).\n2018-06-21T19:34:18.991172Z 0 [Warning] Can't create test file /home/[my username]/.local/share/akonadi/db_data/[my hostname].lower-test\n2018-06-21T19:34:18.992274Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.22-0ubuntu0.16.04.1) starting as process 11859 ...\n2018-06-21T19:34:19.006500Z 0 [Warning] Can't create test file /home/[my username]/.local/share/akonadi/db_data/[my hostname].lower-test\n2018-06-21T19:34:19.006549Z 0 [Warning] Can't create test file /home/[my username]/.local/share/akonadi/db_data/[my hostname].lower-test\n2018-06-21T19:34:19.006623Z 0 [ERROR] failed to set datadir to /home/[my username]/.local/share/akonadi/db_data/\n2018-06-21T19:34:19.006632Z 0 [ERROR] Aborting\n\n2018-06-21T19:34:19.006658Z 0 [Note] Binlog end\n2018-06-21T19:34:19.006726Z 0 [Note] /usr/sbin/mysqld: Shutdown complete\n\n" org.kde.pim.akonadiserver: exit code: 1 org.kde.pim.akonadiserver: process error: "Unknown error" mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/tmp/akonadi-[my username].UXCgLp/mysql.socket' (2)' Check that mysqld is running and that the socket: '/tmp/akonadi-[my username].UXCgLp/mysql.socket' exists! org.kde.pim.akonadiserver: Failed to remove runtime connection config file org.kde.pim.akonadicontrol: Application 'akonadiserver' exited normally...
這產生了一些有趣的行。有問題的是
org.kde.pim.akonadiserver: stderr: "mysqld: Can't change dir to '/home/[my username]/.local/share/akonadi/db_data/' (Errcode: 2 - No such file or directory)
。對我來說,這看起來就像程序試圖寫入它無權訪問的目錄並且拋出錯誤,就像touch ~/nonexistent_dir/file.txt
會一樣。所以我跑了
cd ~/.local/share/akonadi/; mkdir db_data
一遍又一遍。巴姆它奏效了。