Bootstrap

Ubuntu | PostgreSQL | 解决 ICU library not found / bison not found / m4 not found.

解决

# 安装缺失的库icu/pkg/bison/flex/m4库
su - root
apt install libicu-dev pkg-config bison flex m4 -y

运行

su - root
mv /home/ubuntu/postgresql-17.2.tar.gz ../postgres
chown -R postgres:postgres /home/postgres/postgresql-17.2.tar.gz
su - postgres
tar -zxvf postgresql-17.2.tar.gz
cd postgresql-17.2
./configure --prefix=/usr/local/pg17_2

现象

...
checking whether the C compiler still works... yes
checking how to run the C preprocessor... gcc -E
checking for pkg-config... no
checking whether to build with ICU support... yes
checking for icu-uc icu-i18n... no
configure: error: ICU library not found
If you have ICU already installed, see config.log for details on the
failure.  It is possible the compiler isn't looking in the proper directory.
Use --without-icu to disable ICU support.

在这里插入图片描述

;