我正在尝试在我的linux ubuntu 12.04机器上安装DBD :: pg模块,但是无法这样做。我正在使用下载方法,因为我在从CPAN终端安装时遇到连接问题。当我运行perl Makefile.PL时,它会让我跟随。
Configuring DBD::Pg 3.4.2
Path to pg_config? /vol01/local/rina/cac/softwares/pgsql
Enter a valid PostgreSQL postgres major version number 8
Enter a valid PostgreSQL postgres minor version number 8
Enter a valid PostgreSQL postgres patch version number 8
Enter a valid PostgreSQL postgres bin dir /vol01/local/rina/cac/softwares/bin
Enter a valid PostgreSQL postgres include dir /vol01/local/rina/cac/softwares/pg_inc
我不知道在上面的问题中放了什么,我仍然手动创建了一些目录并按上述方式提供。
然后它给了我这个
PostgreSQL version: 80898 (default port: 5432)
POSTGRES_HOME: (not set)
POSTPGRES_INCLUDE: /vol01/local/rina/cac/softwares/pg_inc
POSTGRES_LIB: /usr/local/pgsql/lib -lssl -lcrypto
OS: linux
Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/auto/DBI/ at Makefile.PL line 182
Warning: prerequisite Time::HiRes 0 not found.
Multiple copies of Driver.xst found in: /usr/local/lib64/perl5/auto/DBI/ /usr/lib64/perl5/auto/DBI/ at Makefile.PL line 285
Using DBI 1.631 (for perl 5.010001 on x86_64-linux-thread-multi) installed in /usr/local/lib64/perl5/auto/DBI/
Writing Makefile for DBD::Pg
稍后当我运行make时,它会多次给出以下错误
Pg.xs:301: error: ‘imp_dbh_t’ has no member named ‘sqlstate
如何成功安装此模块?我发现很少有类似的问题,但找不到解决方案。请帮忙。
答案 0 :(得分:1)
在Geetika的评论中解决:
我是在centOS机器上做的...我跑了" yum install postgresql-devel"然后成功安装模块...非常感谢您的时间和帮助...... :)