asdf-community/asdf-php

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

robertwt7 opened this issue · 4 comments

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>

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?

@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.

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

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.