我试图在ubuntu 10.04和PHP 5.4.37中安装pdo_pgsql。实际上,postgresql已经安装并且可以通过phppgadmin正常运行。在Ubuntu10中安装pdo_pgsql不起作用
现在的问题是缺少pgsql的pdo驱动程序。
我安装的pgsql PDO,当我输入PECL安装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,
在Additional .ini files parsed
但我无法看到加载在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安装的php5-pgsql的 –
是的,我试过了,我得到这个消息, 读取软件包列表...完成 大厦的依赖关系树 读取状态信息...完成 无法安装一些软件包。这可能意味着您有 请求一个不可能的情况,或者如果您正在使用不稳定的 分发版,但尚未创建一些必需的软件包 或已移出传入。 下列软件包有未满足的依赖关系: 的php5-pgsql的:取决于:phpapi-20090626 取决于:PHP5共用(= 5.3.2-1ubuntu4.30),但5.4.37-1 + deb.sury.org〜清醒+1被安装 E:破包 –
php5-pgsql需要php 5.4或更高版本,你可以用'sudo apt-get install php-pgsql'来试用它 –