无法在 Ubuntu VPS 上安装 php-redis

unable to install php-redis on ubuntu vps

提问人:Amir1387aht 提问时间:10/29/2023 最后编辑:Amir1387aht 更新时间:10/29/2023 访问量:63

问:

我需要在我的 ubuntu 服务器上安装, 我已经安装在我的 VPS 服务器上 但是我无法在此服务器上安装php-redis:php-redisredis serverubuntu v20.04.6 STANDARD vmware php 8.1

首先我尝试:sudo apt install php-redis

我得到:

Package php-redis is a virtual package provided by:
  php8.2-redis 6.0.1-1+ubuntu20.04.1+deb.sury.org+1 [Not candidate version]
  php8.1-redis 6.0.1-1+ubuntu20.04.1+deb.sury.org+1 [Not candidate version]
  php8.0-redis 6.0.1-1+ubuntu20.04.1+deb.sury.org+1 [Not candidate version]
  php7.4-redis 6.0.1-1+ubuntu20.04.1+deb.sury.org+1 [Not candidate version]
  php7.3-redis 6.0.1-1+ubuntu20.04.1+deb.sury.org+1 [Not candidate version]
  php7.2-redis 6.0.1-1+ubuntu20.04.1+deb.sury.org+1 [Not candidate version]
  php7.1-redis 1:5.3.7-1+ubuntu20.04.1+deb.sury.org+1 [Not candidate version]
  php7.0-redis 1:5.3.7-1+ubuntu20.04.1+deb.sury.org+1 [Not candidate version]
  php5.6-redis 1:4.3.0-1+ubuntu20.04.1+deb.sury.org+1 [Not candidate version]

E: Package 'php-redis' has no installation candidate

然后我问chat-gpt,他告诉我运行这个命令:但它没有帮助,因为我得到:sudo apt install php8.1-redis

This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php8.1-redis' has no installation candidate
php linux ubuntu redis phpredis

评论

0赞 Markus Zeller 10/30/2023
尝试通过 .pecl install redis
0赞 Amir1387aht 11/2/2023
Peel 已弃用,无法安装在我的版本中
0赞 Markus Zeller 11/2/2023
pecl从什么时候开始衰退?最新版本来自两周前。pecl.php.net/package/redis
0赞 Amir1387aht 11/2/2023
当我跑步时我得到了,那么当我跑步时我得到了,我该怎么办?apt install php-pearCommand 'pecl' not found, but can be installed with: apt install php-pearapt install php-pearPackage php-pear is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'php-pear' has no installation candidate
0赞 Markus Zeller 11/2/2023
有几种方法可以解决这个问题。只需谷歌一下。

答: 暂无答案