FreeBSD 12.1-RELEASE amd64 の pkg が libreadline に依存するので別途入れた方が良い2020年11月22日 12時55分17秒

SQLite が libreadline が必要だが入っていないので、libmap.conf で libedit に振り替えたが、今度は PostgreSQL を入れたらもっと困難なエラーが出た。
% psql -U postgres
ld-elf.so.1: /usr/local/bin/psql: Undefined symbol "rl_reset_screen_size"
rl_reset_screen_size 関数が見付からないと出てくる。libreadline は libedit と互換はあるが、全部の API が実装されているわけではないようだ。

そこで、pkg の方を疑う。明示的に libreadline への依存が書かれていないのではないかと。

% pkg search readline
...
readline-8.0.4                 Library for editing command lines as they are typed
...
libreadline は pkg には存在するようだ。

readline を pkg install で入れてみる。

# pkg install readline
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        compat7x-amd64: 7.4.704000.201310.1

Installed packages to be UPGRADED:
        readline: 7.0.3_1 -> 8.0.0

Number of packages to be installed: 1
Number of packages to be upgraded: 1

The process will require 17 MiB more space.
5 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/2] Upgrading readline from 7.0.3_1 to 8.0.0...
[1/2] Extracting readline-8.0.0: 100%
[2/2] Installing compat7x-amd64-7.4.704000.201310.1...
[2/2] Extracting compat7x-amd64-7.4.704000.201310.1: 100%
=====
Message from compat7x-amd64-7.4.704000.201310.1:
*******************************************************************************
*                                                                             *
* Do not forget to add COMPAT_FREEBSD7 into                                   *
* your kernel configuration (enabled by default).                             *
*                                                                             *
* To configure and recompile your kernel see:                                 *
* http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html *
*                                                                             *
*******************************************************************************
--
これで libreadline の libedit への振り替えを libmap.conf から削除。これで、SQLite と PostgreSQL が共に動くようになった。

前回