jbboehr / php-psr

PHP extension providing the accepted PSR interfaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to install with PHP 7.4

joglomedia opened this issue · comments

Hi there,

I have trying to install PSR (from source) on PHP 7.4 (from Ondrej repo), but got this error

$ php7.4 --ri psr
PHP Warning:  PHP Startup: psr: Unable to initialize module
Module compiled with module API=20180731
PHP    compiled with module API=20190902
These options need to match
 in Unknown on line 0
PHP Warning:  Cannot load module 'phalcon' because required module 'psr' is not loaded in Unknown on line 0
Extension 'psr' not present.

My system

$ uname -a
Linux dev.eslabs.id 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ /usr/bin/phpize7.4 --version
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
$ /usr/bin/php-config7.4 --version
7.4.1

any solutions?

thanks

@joglomedia Please provide step by step the way you used to install the extension. Any logs/output during installation will helps as well.

@joglomedia Can you retry the installation with the phpize and configure step as /usr/bin/phpize7.4 && ./configure --with-php-config=/usr/bin/php-config7.4? Looks like 20180731 corresponds to PHP 7.3 so it sounds like maybe /usr/bin/php-config may be symlinked to /usr/bin/php7.3-config.

Alternatively (no pun intended), set the default PHP version for your system to PHP 7.4, see [0].

@sergeyklay @jbboehr oops, it seems that my default phpize & php-config linked to 7.3, didn't aware about it before. i have changed it and it seems working now, thanks for pointing it out..