0

Linux Mint 20.2,Postgres 9.6

我需要安装plv8

我试试这个:

 wget https://github.com/plv8/plv8/archive/v2.0.0.tar.gz
 tar -xvzf v2.0.0.tar.gz
 cd plv8-2.0.0
 make static
 make install

但我得到错误:

cat: '/usr/include/postgresql/12/server/pg_config*.h': No such file or directory
/bin/sh: 1: test: -ge: unexpected operator
/bin/sh: 1: test: -lt: unexpected operator
/bin/sh: 1: test: -lt: unexpected operator
/bin/sh: 1: test: -lt: unexpected operator
/bin/sh: 1: test: -lt: unexpected operator
make -f Makefile.v8
make[1]: Entering directory '/home/alexeij/Downloads/plv8/plv8-2.0.0'
cat: '/usr/include/postgresql/12/server/pg_config*.h': No such file or directory
/bin/sh: 1: test: -ge: unexpected operator
/bin/sh: 1: test: -lt: unexpected operator
/bin/sh: 1: test: -lt: unexpected operator
/bin/sh: 1: test: -lt: unexpected operator
/bin/sh: 1: test: -lt: unexpected operator
g++ -Wall -O2 -std=c++11 -fno-rtti  -Ibuild/v8-git-mirror-5.4.500.43/include -Ibuild/v8-git-mirror-5.4.500.43 -I. -I./ -I/usr/include/postgresql/12/server -I/usr/include/postgresql/internal  -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2  -I/usr/include/mit-krb5 -fPIC -c -o plv8.o plv8.cc
make[1]: g++: Command not found
make[1]: *** [Makefile:85: plv8.o] Error 127
make[1]: Leaving directory '/home/alexeij/Downloads/plv8/plv8-2.0.0'
make: *** [Makefile:145: static] Error 2
4

1 回答 1

1

安装构建工具和一些常用的 *-dev 包:

apt-get install build-essential autoconf automake gdb git libffi-dev zlib1g-dev libssl-dev

构建文件中列出了其他特定的 *-dev 包。您还需要为 PostgreSQL 安装 *-dev 包。要找到确切的包名称,您可以使用 apt-file 实用程序来搜索丢失的头文件:

sudo apt install apt-file
sudo apt-file update
apt-file search pg_config
于 2021-08-06T01:15:44.273 回答