无法创建扩展 plv8 postgresql

7 postgresql plv8

安装postgres后,无法创建扩展plv8。

我正在使用:CREATE EXTENSION plv8;

我越来越:

ERROR:  could not open extension control file "/usr/local/share/postgresql/extension/plv8.control": No such file or directory
********** Error **********

ERROR: could not open extension control file "/usr/local/share/postgresql/extension/plv8.control": No such file or directory
SQL state: 58P01
Run Code Online (Sandbox Code Playgroud)

版本 postgres:9.6.2 版本 pgAdmin4:1.4

如何安装plv8?

小智 3

这应该适用于大多数平台(https://github.com/plv8/plv8/issues/212#issuecomment-287589193):

$ easy_install pgxnclient
$ pgxnclient install plv8
Run Code Online (Sandbox Code Playgroud)

但这对我不起作用。我想出的唯一解决方案是从源代码构建库

如果您没有安装wget,请运行:

$ brew install wget
Run Code Online (Sandbox Code Playgroud)

然后运行:

$ 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
Run Code Online (Sandbox Code Playgroud)

这对我有用。