我正在尝试在 OVH VPS Cloud 实例上安装 dovecot 的 fts-xapian 模块。我目前使用的是 Ubuntu 16.04。编译 fts-xapian 后,我发现它已安装在 中/usr/lib/dovecot/modules
,但是当我在 dovecot.conf 中启用该插件时,我在邮件日志中看到一个错误:
Error: Couldn't load required plugin /usr/lib/dovecot/modules/lib21_fts_xapian_plugin.so: Module is for different ABI version 2.2.ABIv22(2.2.22) (we have 2.3.ABIv9(2.3.9.2))
为了编译 fts-xapian,我必须更新系统 ICU。我从这里编译了 ICU:
https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz
以下是我遵循的步骤:
$ add-apt-repository ppa:xapian/backports
$ apt update
$ apt upgrade
$ apt install python3-xapian
$ apt install libxapian-dev
编辑 /etc/apt/sources.list 并添加:
deb-src http://archive.ubuntu.com/ubuntu/ xenial main universe restricted multiverse #Added by software-properties
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates restricted main universe multiverse #Added by software-properties
deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb-src http://security.ubuntu.com/ubuntu/ xenial-security restricted main universe multiverse #Added by software-properties
deb-src http://archive.ubuntu.com/ubuntu/ xenial-proposed restricted main universe multiverse #Added by software-properties
然后
$ apt update
$ apt build-dep dovecot-core
$ apt install dovecot-dev
$ apt install libicu-dev
(系统 ICU 需要更新才能使下一个版本正常运行)
$ cd /tmp
$ wget https://github.com/unicode-org/icu/releases/download/release-65-1/icu4c-65_1-src.tgz
$ tar -xvf icu4c-65_1-src.tgz
$ cd icu/source
$ ./configure --prefix=/usr
$ make install
$ icu-config --version
我们现在应该看到系统 icu 版本为 65.1
$ cd /usr/share
$ git clone https://github.com/grosjo/fts-xapian
$ cd fts-xapian
$ autoreconf -vi
$ ./configure --with-dovecot=/usr/lib/dovecot
$ make
$ make install
我认为问题在于 dovecot-dev 的版本是 v2.2.22,而 dovecot 的版本是 v2.3.92。我的系统告诉我 dovecot-dev 已经是最新版本。我该如何更新 dovecot-dev 以使其与我的 dovecot 匹配?我需要从源代码编译吗?