php - sudo apt-get install php-redis 停止工作

标签 php redis apt-get circleci phpredis

在我们的 CircleCI 构建中,我们已经安装了几个月的 PHP redis,但它今天停止工作了。返回消息如下。

请问你知道怎么解决吗?我有点困惑该怎么办。感谢您的帮助。

sudo apt-get install php-redis Reading package lists... Done

Building dependency tree

Reading state information... Done

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:

php-redis: Depends: php-igbinary but it is not going to be installed Dep

ends: phpapi-20160303 but it is not installable or phpapi-20151012 but it is not installable or phpapi-20131226 but it is not installable E: Unable to correct problems, you have held broken packages.

sudo apt-get install php-redis returned exit code 100

Action failed: sudo apt-get install php-redis

我们在 CircleCi 中的流程是这样的:

  • sudo apt-add-repository -y ppa:ondrej/php
  • sudo apt-get 更新
  • sudo apt-get install php-redis
  • echo 'extension=/usr/lib/php/20131226/redis.so' | sudo tee/opt/circleci/php/$(phpenv global)/etc/conf.d/redis.ini
  • echo 'extension=/usr/lib/php/20131226/igbinary.so' | sudo tee/opt/circleci/php/$(phpenv global)/etc/conf.d/igbinary.ini

已解决: 使用 sudo apt-get -f 安装 php-redis

最佳答案

听起来好像还有其他依赖项没有被主包安装。当我通过 dpkg 安装时,这通常发生在我身上(通常是下载的 Chrome deb 包)。

当你运行时

sudo apt-get upgrade

它通常会告诉你安装失败并建议你运行

sudo apt-get -f install

这些通常会解决依赖关系并安装所需的任何额外包。

关于php - sudo apt-get install php-redis 停止工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45508015/

相关文章:

django - 将 2 个缓存条目合并为一个

linux - 无法安装 FlatPak(Linux - Monodevelop)

qt - 从 Ubuntu 上的 GTK+ 开始

PHP全局安装包 : apt-get vs composer

php - 获取特定时区的 PHP 中的当前日期时间

php - 如何处理一个大的 mySQL 树

redis - 有没有办法在 redis 排序集上设置成员限制?

php - composer 在 composer GitBash 上安装 Sylius 时超过了 300 秒的超时

php - 我可以从 try and catch 中返回 false 而不是抛出异常吗

express - Redis monitor 命令每秒显示相同的请求