asdf-community / asdf-php

PHP plugin for the asdf version manager
https://github.com/asdf-vm/asdf
Apache License 2.0
215 stars 100 forks source link

[Ubuntu 20 (wsl2)] Cannot find libpq-fe.h #133

Open robertwt7 opened 2 years ago

robertwt7 commented 2 years ago
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

I'm still experiencing #99 on master. Shouldn't this be fixed by #102 already?

This command fixes it, however shouldn't we be able to run it without the var?

PHP_WITHOUT_PDO_PGSQL=yes asdf install php <version>
nobleach commented 2 years ago

Running into this as well. I don't plan on installing Postgres locally on my machine. (I'd prefer to use a Docker container). If I use this env var, won't this negate my ability to use PDO to connect to Postgres completely?

DanielRios549 commented 1 year ago

@nobleach From what I understand yes, this is not the PotsgresSQL itself, it is the "plugin" PDO uses to connect to this type of database.

99linesofcode commented 1 year ago

If you want PHP to be compiled with PostgreQSL support, you need to install the libpq package so that it can. If you do not plan on using PostgreSQL and therefore do not need the postgres module, you need to pass that environment variable. For more information see: https://www.php.net/manual/en/book.pgsql.php

uzuki-P commented 5 months ago

after checking the install script, there's actually a PHP_WITHOUT_PDO_PGSQL env here. So you can run PHP_WITHOUT_PDO_PGSQL=yes asdf install php latest. It work for me at least.