首页 > 解决方案 > 创建 PLR 扩展 Postgres 时出错

问题描述

我正在尝试在 Postgres 10.4 中创建 PLR 扩展,但它给了我错误:

ERROR:  could not load library "C:/Program Files/PostgreSQL/10/lib/plr.dll": The specified module could not be found.


SQL state: XX000

我使用 Windows 10,R 3.4.2。我下载了这个版本的 PL/R:Win64 plr.dll for Postgres 10.x, R-3.4.2 (plr-8.3.0.17)

我根据需要将dll文件放入lib文件夹并重新启动psql服务。R_HOME设置为 C:\Program Files\R\R-3.4.2。

路径变量:C:\Program Files\PostgreSQL\10\lib 和 C:\Program Files\PostgreSQL\10\bin

有什么问题?

标签: sqlrpostgresqlplr

解决方案


您还需要文件夹中的 plr.control 和相应的 sql 文件share/extension/

R_HOME只要正确的信息在 Windows 注册表中,新版本的 PL/R就不再需要在 Windows 上HKLM\SOFTWARE\R-core\R。卸载旧版本的 R 可能会删除它!!!


推荐阅读