【laravel5.4】安装指定版本的predis 和 处理laravel5.*安装使用Redis以及解决Class 'PredisClient' not found和Fatal error: Non-static method Redis::set() cannot be called statically错误 Class 'PredisClient' not found

(predis下载地址:https://packagist.org/packages/predis/predis)

1、cmoposer 命令行: php composer require predis/predis:1.0.4

2、若服务器已安装了 phpredis扩展,需要进行更名处理:

【laravel5.4】安装指定版本的predis 和 处理laravel5.*安装使用Redis以及解决Class 'PredisClient' not found和Fatal error: Non-static method Redis::set() cannot be called statically错误
Class 'PredisClient' not found

3、出现:

因为 你没有装predis 类库。