我错误地安装了postgresql-11,已卸载并安装了10。此时,我安装的软件包是:
nominatim@bolt88:~/Nominatim-3.2.0/build$ apt list --installed |grep postg
postgis/jessie-pgdg,now 2.4.4+dfsg-4.pgdg80+1 amd64 [installed]
postgis-doc/jessie-pgdg,now 2.4.4+dfsg-4.pgdg80+1 all [installed,automatic]
postgresql-10/jessie-pgdg,now 10.6-1.pgdg80+1 amd64 [installed]
postgresql-10-postgis-2.4-scripts/jessie-pgdg,now 2.4.4+dfsg-4.pgdg80+1 all [installed]
postgresql-client-10/jessie-pgdg,now 10.6-1.pgdg80+1 amd64 [installed,automatic]
postgresql-client-common/jessie-pgdg,now 199.pgdg80+1 all [installed,automatic]
postgresql-common/jessie-pgdg,now 199.pgdg80+1 all [installed,automatic]
postgresql-server-dev-10/jessie-pgdg,now 10.6-1.pgdg80+1 amd64 [installed]
但是版本11似乎已经将其.so抛在了后面:
jeremyr@bolt88:/srv/nominatim$ ls -l /usr/lib/x86_64-linux-gnu/libpq*
-rw-r--r-- 1 root root 469174 Jan 28 05:07 /usr/lib/x86_64-linux-gnu/libpq.a
lrwxrwxrwx 1 root root 13 Jan 28 05:07 /usr/lib/x86_64-linux-gnu/libpq.so -> libpq.so.5.11
lrwxrwxrwx 1 root root 13 Jan 28 05:07 /usr/lib/x86_64-linux-gnu/libpq.so.5 -> libpq.so.5.11
-rw-r--r-- 1 root root 301040 Jan 28 05:07 /usr/lib/x86_64-linux-gnu/libpq.so.5.11
在另外一次安装(使用nominatim的情况下,要使用OpenStreetMap)的cmake显然将5.11识别为属于psql v11:
-- Found PostgreSQL: /usr/lib/x86_64-linux-gnu/libpq.so (found version "11.1 (Debian 11.1-3.pgdg80+1)")
我可以只移动.so并尝试另一个apt-get install postgresql-10
吗?