Skip to content

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 3 years ago4.3K 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
EXPERT
answered 3 years ago
EXPERT
reviewed 2 years ago
0
answered 2 years 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.