php-redis on amazon linux 2

2

I'm working to deploy a laravel application on an Amazon Linux 2 instance.

I'm getting this error: Class "Redis" not found and the last error in the stack trace: vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:81

While looking around, it seems that the solution on CentOS and other "yum" distro's is to install php-redis. I haven't been able to find any such package for the Amazon Linux AMI.

How can I install php-redis?

asked a year ago2336 views
2 Answers
1
sudo yum update
sudo amazon-linux-extras install epel -y
sudo yum install php-pecl-redis

php -i | grep Redis
Redis Support => enabled
Redis Version => 2.2.8
profile picture
EXPERT
answered a year ago
profile picture
EXPERT
Artem
reviewed 4 days ago
0
answered 18 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions