急问:如何在Linux下安装DBD::Pg?

jackey_option 2010-12-07 01:16:50
各位高手,请问如何在linux下安装DBD::Pg?

在网上搜了一下,多数都是源码安装,比较麻烦

是否有比较简单的安装方法?比如一个.rpm文件
...全文
590 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
wyaoshenm 2011-09-06
  • 打赏
  • 举报
回复
按照上面的步骤不行啊!
fibbery 2010-12-30
  • 打赏
  • 举报
回复
源码下载地址:http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/DBD-Pg-2.17.2.tar.gz
安装前请阅读README。
fibbery 2010-12-30
  • 打赏
  • 举报
回复
to lengfeng198267:

我懒得跟你争!

以下是安装步骤。不管是什么模块,安装步骤都是标准的,所以,复杂吗?难吗?只是一层窗户纸,捅破了就是了!

Before installing, please use the "cpansign -v" program to cryptographically
verify that your copy of DBD::Pg is complete and valid. The program
"cpansign" is part of Module::Signature, available from CPAN.

By default Makefile.PL uses App::Info to find the location of the
PostgreSQL library and include directories. However, if you want to
control it yourself, define the environment variables POSTGRES_INCLUDE
and POSTGRES_LIB, or define just POSTGRES_HOME. Note that if you have
compiled PostgreSQL with SSL support, you must define the POSTGRES_LIB
environment variable and add "-lssl" and "-lcrypto" to it, like this:

export POSTGRES_LIB="/usr/local/pgsql/lib -lssl -lcrypto"

The usual steps to install DBD::Pg:

1. perl Makefile.PL
2. make
3. make test
4. make install

Do steps 1 to 2 as a normal user, not as root!

If the script cannot find the pg_config information itself, it will
ask you for the path to it. Enter the complete path to the pg_config
file here, including the name of the file itself.


说白了,基本步骤就是四点:
1. perl Makefile.PL
2. make
3. make test
4. make install
另外加上一个前提,就是编译之前要指定相应的环境变量,使编译过程中能够找到相应的动态库。

不同的包,使用不同的环境变量,比如,Oracle需要PATH, LD_LIBRARY_PATH, ORACLE_HOME等。这些在README中都说明得很清楚!
lengfeng198267 2010-12-30
  • 打赏
  • 举报
回复
To Zhou_Andy

我在你的地盘也能看到fibbery,真是猿粪啊。哈哈哈哈哈(原则性的回答永远不会错,却不提供解决思路)



我在安装的时候,也遇到和你类似的问题。不知道你遇到过不
===========================================
configuring DBD::Pg
Remember to actually read the README file
Path to pg_configuring?
===========================================

fibbery 2010-12-07
  • 打赏
  • 举报
回复
源码安装也很简单,一定要突破一个瓶颈,才能迈一个台阶。什么事情都是,不要自己设置障碍,要敢于动手。

37,720

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧