由于未满足的依赖关系而无法在Ubuntu 16上安装php-memcached

我正在维护3个都运行Ubuntu 16.04的Web服务器。目前,我们正在尝试从php-memcache迁移到php-memcached,然后再将服务器升级到18.04,甚至可能是20.04。

我已经在3个Web服务器中的1个上成功安装了php-memcached,但是另外两个给我一个依赖错误。

# apt-get install php-memcached

[...]
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 create or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php-memcached: Depends: php-common (>= 1:7.0+33~) but it is not going to be installed

Depends: phpapi-20151012
E: Unable to correct problems, you have held broken packages.

尝试了更新-> dist-upgrade并重新启动,但这并没有解决问题。

这些是根据以下内容的存储库apt-get update

# apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease                            
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Fetched 325 kB in 0s (364 kB/s)             

看来麻烦在于phpapi-20151012

# apt-get -o Debug::pkgProblemResolver=yes install phpapi-20151012
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package phpapi-20151012 is a virtual package provided by:
  php7.0-phpdbg 7.0.33-0ubuntu0.16.04.15
  php7.0-fpm 7.0.33-0ubuntu0.16.04.15
  libphp7.0-embed 7.0.33-0ubuntu0.16.04.15
  php7.0-cli 7.0.33-0ubuntu0.16.04.15
  php7.0-cgi 7.0.33-0ubuntu0.16.04.15
  libapache2-mod-php7.0 7.0.33-0ubuntu0.16.04.15
You should explicitly select one to install.

E: Package 'phpapi-20151012' has no installation candidate

据我了解,以上消息phpapi-20151012应该与所列软件包之一一起提供。我已经安装了其中的2个,但仍然没有phpapi。所以我尝试安装一个我没有的东西,但是那也不起作用。

似乎php-common包还可以:

# apt-get -o Debug::pkgProblemResolver=yes install php-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
php-common is already the newest version (1:62+ubuntu14.04.1+deb.sury.org+1).
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

我还注意到php 7.1软件包似乎是Ubuntu 14的遗留物:

php7.1-cli/now 7.1.19-1+ubuntu14.04.1+deb.sury.org+1 amd64 [installed,local]
php7.1-common/now 7.1.19-1+ubuntu14.04.1+deb.sury.org+1 amd64 [installed,local]
php7.1-json/now 7.1.19-1+ubuntu14.04.1+deb.sury.org+1 amd64 [installed,local]
php7.1-opcache/now 7.1.19-1+ubuntu14.04.1+deb.sury.org+1 amd64 [installed,local]
php7.1-readline/now 7.1.19-1+ubuntu14.04.1+deb.sury.org+1 amd64 [installed,local]

Apache使用的是php 7.0,而cli使用的是7.1 ...因此,作为开始,我已经将php cli降级为7.0:

# update-alternatives --config php
There are 3 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/php7.1   71        auto mode
  1            /usr/bin/php5.6   56        manual mode
  2            /usr/bin/php7.0   70        manual mode
  3            /usr/bin/php7.1   71        manual mode

Press <enter> to keep the current choice[*], or type selection number: 2

# update-alternatives --config php
There are 3 choices for the alternative php (providing /usr/bin/php).

  Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/php7.1   71        auto mode
  1            /usr/bin/php5.6   56        manual mode
* 2            /usr/bin/php7.0   70        manual mode
  3            /usr/bin/php7.1   71        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

接下来,我删除了7.1软件包:

apt-get remove php7.1-cli
apt-get autoremove

之后,所有的php7.1软件包都消失了

然后尝试这个:

apt-get update --fix-missing
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu xenial InRelease                            
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [802 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [723 kB]
Fetched 1,850 kB in 1s (1,091 kB/s)                      
Reading package lists... Done

# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

还是没有运气...我不知道。有什么建议么?


更新:

根据评论中的要求:

# apt policy php-common
php-common:
  Installed: 1:62+ubuntu14.04.1+deb.sury.org+1
  Candidate: 1:62+ubuntu14.04.1+deb.sury.org+1
  Version table:
 *** 1:62+ubuntu14.04.1+deb.sury.org+1 100
        100 /var/lib/dpkg/status
     1:35ubuntu6.1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
     1:35ubuntu6 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu xenial/main i386 Packages
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu xenial/main i386 Packages
斯蒂芬·基特

仍然至少有一个PHP 7.1软件包的剩余部分php-common您需要将其降级到Ubuntu存储库中可用的版本:

apt install php-common=1:35ubuntu6.1

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

由于未满足依赖关系而无法安装VLC

来自分类Dev

由于未满足依赖关系而无法在Ubuntu 16.04上安装libxi-dev和libxmu-dev

来自分类Dev

由于未满足的依赖关系而无法安装Meson,似乎无法解决?

来自分类Dev

由于未满足的依赖关系而无法安装gcc-4.8

来自分类Dev

由于未满足的依赖关系而无法安装gcc-4.8

来自分类Dev

由于未满足的依赖关系而无法安装linux-header

来自分类Dev

由于未满足依赖关系而无法安装qtbase5-dev

来自分类Dev

由于未满足依赖关系而无法安装libsdl2-dev

来自分类Dev

由于未满足的依赖关系,PinguyBuilder 未安装在 Ubuntu 20.04 上

来自分类Dev

由于“未满足的依赖项”而无法安装 libssl1.0.0:i386?

来自分类Dev

在Ubuntu 12.04上安装memcached

来自分类Dev

由于未满足的依赖性,无法在 Ubuntu 18.04 上安装 git 相关软件包

来自分类Dev

由于Ubuntu 18.10中存在未满足的依赖关系,因此未安装build-essential

来自分类Dev

由于依赖关系未满足,因此无法安装Google Chrome更新

来自分类Dev

由于依赖关系未满足,因此无法安装Google Chrome更新

来自分类Dev

在ubuntu未满足的依赖关系中安装GD库

来自分类Dev

无法在Heroku上配置MemCached

来自分类Dev

安装wine时未满足的依赖关系

来自分类Dev

安装wine时未满足的依赖关系

来自分类Dev

Codelite安装未满足的依赖关系

来自分类Dev

安装Clang ++时未满足的依赖关系

来自分类Dev

在运行ubuntu的arm v7上安装openjdk 7时未满足的依赖关系

来自分类Dev

在Windows上安装Memcached

来自分类Dev

由于 Debian 中未满足的依赖关系,无法重新安装 ffmpeg/为什么 ffmpeg 没有在视频转换中使用指定的比特率?

来自分类Dev

在Debian上安装Git时未满足的依赖关系

来自分类Dev

Memcached已安装在MAMP 3.0.3的PHP 5.3.28上,但无法正常工作

来自分类Dev

由于依赖关系而无法安装IBM Worklight插件

来自分类Dev

在Ubuntu 14.04上安装Memcached :: libmemcached时出错

来自分类Dev

由于未满足依赖性而导致无法安装kubuntu-desktop

Related 相关文章

  1. 1

    由于未满足依赖关系而无法安装VLC

  2. 2

    由于未满足依赖关系而无法在Ubuntu 16.04上安装libxi-dev和libxmu-dev

  3. 3

    由于未满足的依赖关系而无法安装Meson,似乎无法解决?

  4. 4

    由于未满足的依赖关系而无法安装gcc-4.8

  5. 5

    由于未满足的依赖关系而无法安装gcc-4.8

  6. 6

    由于未满足的依赖关系而无法安装linux-header

  7. 7

    由于未满足依赖关系而无法安装qtbase5-dev

  8. 8

    由于未满足依赖关系而无法安装libsdl2-dev

  9. 9

    由于未满足的依赖关系,PinguyBuilder 未安装在 Ubuntu 20.04 上

  10. 10

    由于“未满足的依赖项”而无法安装 libssl1.0.0:i386?

  11. 11

    在Ubuntu 12.04上安装memcached

  12. 12

    由于未满足的依赖性,无法在 Ubuntu 18.04 上安装 git 相关软件包

  13. 13

    由于Ubuntu 18.10中存在未满足的依赖关系,因此未安装build-essential

  14. 14

    由于依赖关系未满足,因此无法安装Google Chrome更新

  15. 15

    由于依赖关系未满足,因此无法安装Google Chrome更新

  16. 16

    在ubuntu未满足的依赖关系中安装GD库

  17. 17

    无法在Heroku上配置MemCached

  18. 18

    安装wine时未满足的依赖关系

  19. 19

    安装wine时未满足的依赖关系

  20. 20

    Codelite安装未满足的依赖关系

  21. 21

    安装Clang ++时未满足的依赖关系

  22. 22

    在运行ubuntu的arm v7上安装openjdk 7时未满足的依赖关系

  23. 23

    在Windows上安装Memcached

  24. 24

    由于 Debian 中未满足的依赖关系,无法重新安装 ffmpeg/为什么 ffmpeg 没有在视频转换中使用指定的比特率?

  25. 25

    在Debian上安装Git时未满足的依赖关系

  26. 26

    Memcached已安装在MAMP 3.0.3的PHP 5.3.28上,但无法正常工作

  27. 27

    由于依赖关系而无法安装IBM Worklight插件

  28. 28

    在Ubuntu 14.04上安装Memcached :: libmemcached时出错

  29. 29

    由于未满足依赖性而导致无法安装kubuntu-desktop

热门标签

归档