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 年前檢視次數 2535 次
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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南