PHPBrew unable to install extensions (extension is already disabled for SAPI)

61 views Asked by At

I'm new to PHPBrew and Linux (if the OS matters). I've built a PHP 8.2 from PHPBrew and ran a new Laravel project, but I can't connect to database because the driver is missing. Everytime I tried to run phpbrew ext install pgsql it returns pgsql extension is already disabled for SAPI

How can I enable pgsql or other extensions in PHPBrew in Linux?

I've tried all solutions I could find online but even the official tutorial of enabling extensions didn't work.

This is the full return statement when I tried to install an extension:

[ ] pgsql extension is already disabled for SAPI .
===> Installing pgsql extension...
Log stored at: /home/~/.phpbrew/build/8.2-dev/ext/pgsql/build.log
Changing directory to /home/~/.phpbrew/build/8.2-dev/ext/pgsql
===> Phpize...
Error: Command failed: phpize > /home/~/.phpbrew/build/8.2-dev/ext/pgsql/build.log 2>&1 returns:

This is the content of the build.log file

Configuring for: PHP Api Version: 20220829 Zend Module Api No: 20220829 Zend Extension Api No: 420220829 Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

1

There are 1 answers

0
Jose Purba On BEST ANSWER

Solved

I need to install autoconf on my system (POP OS)

sudo apt-get install autoconf