reorg / pg_repack

Reorganize tables in PostgreSQL databases with minimal locks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/usr/bin/ld: cannot find -llz4

dbbao opened this issue · comments

commented

root@lhrpg14:/tmp/pg_repack-1.4.8# make
make[1]: Entering directory '/tmp/pg_repack-1.4.8/bin'
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer pg_repack.o pgut/pgut.o pgut/pgut-fe.o -L/usr/lib/x86_64-linux-gnu -Wl,-z,relro -Wl,-z,now -L/usr/lib/llvm-11/lib -Wl,--as-needed -L/usr/lib/x86_64-linux-gnu -lpq -L/usr/lib/postgresql/14/lib -lpgcommon -lpgport -llz4 -lssl -lcrypto -lz -lreadline -lpthread -lrt -ldl -lm -o pg_repack
/usr/bin/ld: cannot find -llz4
collect2: error: ld returned 1 exit status
make[1]: *** [/usr/lib/postgresql/14/lib/pgxs/src/makefiles/pgxs.mk:475: pg_repack] Error 1
make[1]: Leaving directory '/tmp/pg_repack-1.4.8/bin'
make: *** [Makefile:35: all] Error 2
root@lhrpg14:/tmp/pg_repack-1.4.8# apt-get install lz4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lz4 is already the newest version (1.9.3-2).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
root@lhrpg14:/tmp/pg_repack-1.4.8#

You also need to install the dev package.

commented

thank you
apt install -y liblz4-dev zlib1g-dev