Perl CPAN 模块安装失败:DBD::P g (PostgreSQL Driver) 在 Windows7 64



首次登录GitHub:
https://github.com/metacpan/metacpan-web/issues/2266

然后CPAN:
https://rt.cpan.org/Ticket/Display.html?id=131708

第一期:

cpan install DBD::Pg查找LIBPQ 失败.dll

修复:

  1. 设置 Postgres环境变量,以便 CPAN/Perl 可以找到所有 PostgreSQL 二进制文件
  2. 安装了 MinGW
  3. 然后安装了导出MinGW包,所以我可以按照 DBD::P g 自述文件为草莓
  4. LIBPQ导出的符号.DLL如上所述

当前问题:

cpan DBD::Pg安装现在失败,上述所有导出的符号出现以下错误:

dbdimp.o:dbdimp.c:(.text+0x479): undefined reference to 'PQstatus' <...etc...etc...>

有人知道我如何安装它并正常工作,以便我可以使用 Perl 驱动 Postgres?

这对我有用:

  • 视窗 10
  • 草莓Perl 5.30.1
  • 已下载 PostgreSQL 版本 12.1 for Windows x86-64
  • 已运行安装程序。安装前摘要:

    Installation Directory: C:Program FilesPostgreSQL12
    Server Installation Directory: C:Program FilesPostgreSQL12
    Data Directory: C:Program FilesPostgreSQL12data
    Database Port: 5432
    Database Superuser: postgres
    Operating System Account: NT AUTHORITYNetworkService
    Database Service: postgresql-x64-12
    Command Line Tools Installation Directory: C:Program FilesPostgreSQL12
    pgAdmin4 Installation Directory: C:Program FilesPostgreSQL12pgAdmin 4
    Stack Builder Installation Directory: C:Program FilesPostgreSQL12
    
  • 从命令提示符:

    > cpanm DBD::Pg
    --> Working on DBD::Pg
    Fetching http://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-3.10.4.tar.gz ... OK
    Configuring DBD-Pg-3.10.4 ... OK
    Building and testing DBD-Pg-3.10.4 ... OK
    Successfully installed DBD-Pg-3.10.4 (upgraded from 3.8.0)
    1 distribution installed
    

相关内容

  • 没有找到相关文章

最新更新