Install pdo for postgres Ubuntu

前端 未结 5 423
清歌不尽
清歌不尽 2020-12-02 15:49

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/loc         


        
5条回答
  •  借酒劲吻你
    2020-12-02 15:50

    Try the packaged pecl version instead (the advantage of the packaged installs is that they're easier to upgrade):

    apt-get install php5-dev
    pecl install pdo
    pecl install pdo_pgsql
    

    or, if you just need a driver for PHP, but that it doesn't have to be the PDO one:

    apt-get install php5-pgsql
    

    Otherwise, that message most likely means you need to install a more recent libpq package. You can check which version you have by running:

    dpkg -s libpq-dev
    

提交回复
热议问题