1

Deployment of one of the application in our environment started failing while trying to install PHP Redis module on Amazon Linux. The environment has PHP 8 installed. I am getting the below error.

---> Package php-pecl-redis.x86_64 0:2.2.8-1.el7 will be installed
--> Processing Dependency: php(api) = 20100412-64 for package: php-pecl-redis-2.2.8-1.el7.x86_64
--> Processing Dependency: php(zend-abi) = 20100525-64 for package: php-pecl-redis-2.2.8-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: php-pecl-redis-2.2.8-1.el7.x86_64 (epel)
           Requires: php(zend-abi) = 20100525-64
           Installed: php-common-8.0.27-1.amzn2.x86_64 (@amzn2extra-php8.0)
               php(zend-abi) = 20200930-64
           Available: php-common-5.4.16-43.amzn2.x86_64 (amzn2-core)
               php(zend-abi) = 20100525-64
           Available: php-common-5.4.16-43.amzn2.0.1.x86_64 (amzn2-core)
               php(zend-abi) = 20100525-64
           ..

I have listed the php-pecl-redis packages after 'yum update'. Below is the version available.

 yum list | grep "php\-pecl\-redis*"

php-pecl-redis.x86_64                   2.2.8-1.el7                   epel 

I am newbie to linux and could not figure out how to fix this. Please help.

Rob Wilkinson
  • 1,131
  • 5
  • 18
  • 34
  • 1
    The php-pecl-redis extension from the EPEL repository is for PHP 5.4, but you have installed PHP 8.0 from somewhere else, apparently amazon-linux-extras. I'm not terribly familiar with that system, if it has Redis support, or how to install modules that aren't included in the default -- but the [REMI repository](https://computingforgeeks.com/how-to-install-php-8-on-amazon-linux/) seems to be a pretty popular alternative. – Alex Howansky Mar 20 '23 at 18:35
  • @AlexHowansky: Thanks for your quick response. My understanding is that this latest version of this extension is still not available in EPEL. So only option is REMI repo or build from source. Is it correct? I see the below question related to the same issue in the past. Looks like this still holds. https://serverfault.com/questions/997028/where-is-the-redis-module-for-php-on-centos-8-php-pecl-redis – Rob Wilkinson Mar 21 '23 at 13:49
  • 1
    _"So only option is REMI repo or build from source. Is it correct?"_ Or maybe switch your AMI to an OS that supports PHP better, like Ubuntu 22.04 with the Ondrej PPA. – Alex Howansky Mar 21 '23 at 15:04

0 Answers0