gpt4 book ai didi

php - 在 Ubuntu10 中安装 pdo_pgsql 不工作

转载 作者:行者123 更新时间:2023-11-29 13:55:13 25 4
gpt4 key购买 nike

我正在尝试在 ubuntu 10.04 和 PHP 5.4.37 中安装 pdo_pgsql。实际上 postgresql 已安装并与 phppgadmin 一起正常工作。

现在的问题是缺少 pgsql 的 pdo 驱动程序。

我为pgsql安装了pdo,当我输入pecl install pdo_pgsql

# sudo pecl install pdo_pgsql
`pecl/pdo_pgsql is already installed and is the same as the released version 1.0.2

并且还在/etc/php5/apache2/conf.d/中添加了一个新的 pgsql.ini 文件作为extension=pdo_pgsql

当我运行 phpinfo() 时

我能看得见

/etc/php5/apache2/conf.d/pgsql.ini,

解析的其他 .ini 文件中

但是我看不到PDO中加载的驱动,只加载了mysql和sqlite。

我从服务器收到的附加消息,

PHP Warning:  PHP Startup: pdo_pgsql: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0

仅供引用,

我试过了

# sudo apt-get install php5-pgsql

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php5-pgsql: Depends: phpapi-20090626
Depends: php5-common (= 5.3.2-1ubuntu4.30) but 5.4.37-1+deb.sury.org~lucid+1 is to be installed
E: Broken packages

请建议我如何进一步进行。

我什至重新启动了 apache 和服务器本身。

谢谢

最佳答案

apt-get install php5-pgsql

试试这个

----------------------------------------删除

sudo apt-get purge php5-pgsql

使用这个删除pgsql取决于 php 尝试使用 php5-pgsql php-pgsql php4-pgsql

关于php - 在 Ubuntu10 中安装 pdo_pgsql 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33561997/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com