为 postgres Ubuntu 安装 pdo [英] Install pdo for postgres Ubuntu

查看:30
本文介绍了为 postgres Ubuntu 安装 pdo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的 php 安装启用 pdo 驱动程序,但是当我运行命令时

I am trying to enable the pdo driver for my php installation, but when I runn the command

./configure --prefix=/usr/local/webserver/php --with-apxs2=/usr/local/webserver/apache2/bin/apxs --enable-mbstring --enable-intl --with-icu-dir=/usr --with-pgsql=/usr/local/webserver/postgres --with-pdo-pgsql=/usr/local/webserver/postgres

我明白

"Unable to build the PDO PostgreSQL driver: libpq 7.4+ is required"

我在那个目录下安装了 postgresql

I install postgresql in that directory

/usr/local/webserver/postgres

我使用 bin 包和 php 5.3 安装了 postgresql 9.0.4.1

I installed postgresql 9.0.4.1 using the bin package and using php 5.3

推荐答案

Pecl PDO 包现已弃用.顺便说一下,debian 包 php5-pgsql 现在包含常规和 PDO 驱动程序,所以只需:

Pecl PDO package is now deprecated. By the way the debian package php5-pgsql now includes both the regular and the PDO driver, so just:

apt-get install php-pgsql

Apache 也需要重新启动,网站才能使用它:

Apache also needs to be restarted before sites can use it:

sudo systemctl restart apache2

这篇关于为 postgres Ubuntu 安装 pdo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆