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?

已提问 1 年前2526 查看次数
2 回答
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
专家
已回答 1 年前
profile picture
专家
Artem
已审核 1 个月前
  • Didn't work for me.

0
已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则