简体   繁体   English

我无法安装pdo_pgsql.so以在PHP中使用PostgreSQL

[英]I cannot install pdo_pgsql.so to use PostgreSQL in PHP

I have a site that use PostgreSQL database but I found that my RHEL 5 system lacks of pdo_pgsql.so file. 我有一个使用PostgreSQL数据库的站点,但是我发现我的RHEL 5系统缺少pdo_pgsql.so文件。 I have spent several hours trying to install it but it was impossible. 我花了几个小时尝试安装它,但这是不可能的。

When using "rpm -i" command with a lot RPMs found in Internet, I always got dependencies problems. 在Internet上找到许多RPM时使用“ rpm -i”命令时,总是遇到依赖关系问题。

Last command I have issued before posting here was: 我在此处发布之前发出的最后一条命令是:

rpm -i http://yum.postgresql.org/9.1/redhat/rhel-5-i386/pgdg-redhat91-9.1-5.noarch.rpm rpm -i http://yum.postgresql.org/9.1/redhat/rhel-5-i386/pgdg-redhat91-9.1-5.noarch.rpm

The output to that command was: package pgdg-redhat91-9.1-5 is already installed 该命令的输出为:软件包pgdg-redhat91-9.1-5已安装

And in fact, PostgreSQL database is up and running. 实际上,PostgreSQL数据库已启动并正在运行。 The only missing file is pdo_pgsql.so. 唯一缺少的文件是pdo_pgsql.so。

I have used "find . / -name pdo_pgsql.so" to see if that file is somewhere in the disk, but without success. 我已经使用“查找。/ -name pdo_pgsql.so”来查看该文件是否在磁盘中某处,但是没有成功。

Can you point me to the right direction, please? 您能给我指出正确的方向吗?

These are relevant versions: 这些是相关的版本:

  • psql (PostgreSQL) 9.1.2 psql(PostgreSQL)9.1.2
  • PHP 5.3.27 (cli) (built: Dec 8 2013 19:01:03) PHP 5.3.27(CLI)(内置:2013年12月8日19:01:03)
  • Server version: Apache/2.4.1 (Unix) 服务器版本:Apache / 2.4.1(Unix)
  • Red Hat Enterprise Linux Server release 5 (Tikanga) 红帽企业Linux服务器版本5(Tikanga)

Cheers Jaime 干杯海梅

I have recompiled last PHP version with Postgres support option and the problem was solved. 我用Postgres支持选项重新编译了最新的PHP版本,问题已解决。 However, it is strange, because version of PHP I had before worked with postgres. 但是,这很奇怪,因为我以前使用过postgres的PHP版本。 For some reaon, it stopped working, 对于某些原因,它停止工作了,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM