m6w6 / ext-pq

PostgreSQL client library (libpq) binding
BSD 2-Clause "Simplified" License
39 stars 7 forks source link

with-pq=NO #26

Closed sm2017 closed 6 years ago

sm2017 commented 6 years ago

I run

pecl install pq

I answer NO to where to find the postgresql library/headers [yes] : and the following error occured

ERROR: `/var/tmp/pq/configure --with-php-config=/usr/bin/php-config --with-pq=b' failed

How can I install pq in a machine that has no postgres I want to connect to postgres **remotely***

remicollet commented 6 years ago

You don't really need postgresql on client machine, but you really need libpq (postgresql client library).

DaveRandom commented 6 years ago

where to find the postgresql library/headers [yes] : does not expect the value "no" (somewhat confusingly, I suppose).

Firstly, try just leaving this option empty, the default (the "yes" option) is to search common places for the libpq headers. Chances are that as long as you have libpq installed on the machine and you haven't done anything really weird, this will work.

Alternatively, if you know where the headers are, or if you multiple versions of libpq installed and you want to build against a specific version, you can specify the full filesystem path to the directory containing them in this option.

If you do not have libpq installed, you can most likely get it from the package manager provided with your OS (yum, apt-get, etc). If you need any assistance with this, please include information about which OS/version you are running.

sm2017 commented 6 years ago

Ok , I install postgresql10-devel , Solved