我在64bit的Ubuntu Precise上没有这样的问题,但是一旦我尝试启动32位机器,它在这个命令上失败:
# /usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install nginx=1.6.0-1+precise0 Reading package lists... Building dependency tree... Reading state information... 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: nginx : Depends: nginx-full (>= 1.6.0-1+precise0) but it is not going to be installed or nginx-light (>= 1.6.0-1+precise0) but it is not going to be installed or nginx-extras (>= 1.6.0-1+precise0) but it is not going to be installed or nginx-naxsi (>= 1.6.0-1+precise0) but it is not going to be installed Depends: nginx-full (< 1.6.0-1+precise0.1~) but it is not going to be installed or nginx-light (< 1.6.0-1+precise0.1~) but it is not going to be installed or nginx-extras (< 1.6.0-1+precise0.1~) but it is not going to be installed or nginx-naxsi (< 1.6.0-1+precise0.1~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
我可以在实例上看到1.6.0-1 + precise0:
# apt-cache show nginx Package: nginx Version: 1.6.0-1+precise0 Architecture: all Maintainer: Kartik Mistry <[email protected]> Installed-Size: 45 Depends: nginx-full (>= 1.6.0-1+precise0) | nginx-light (>= 1.6.0-1+precise0) | nginx-extras (>= 1.6.0-1+precise0) | nginx-naxsi (>= 1.6.0-1+precise0), nginx-full (<< 1.6.0-1+precise0.1~) | nginx-light (<< 1.6.0-1+precise0.1~) | nginx-extras (<< 1.6.0-1+precise0.1~) | nginx-naxsi (<< 1.6.0-1+precise0.1~) Filename: ./nginx/nginx_1.6.0-1+precise0_all.deb Size: 22514 MD5sum: 510911ed565fba855485f4d25bfd5af6 SHA1: ca3f54a5bb48dd9d806c9c2d92e87ae8b9b96358 SHA256: 1c604932660e160bdc52c0d4fc565263c8ca6ef6ddf130ff29ad08a314c75a88 Section: httpd Priority: optional Homepage: http://nginx.net Description: small, powerful, scalable web/proxy server Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers. . This is a dependency package to install either nginx-full (by default) or nginx-light.
木偶模块:
class nginx::install { # Required by nginx image_filter module package { ['libgd2-xpm','libgd2-xpm-dev']: ensure => 'latest', } package { 'init-system-helpers': ensure => '1.7~precise1~ppa1', } package { 'nginx': ensure => '1.6.0-1+precise0', require => Package['libgd2-xpm','libgd2-xpm-dev','init-system-helpers'], } package { 'nginx-common': ensure => '1.6.0-1+precise0', require => Package['libgd2-xpm','libgd2-xpm-dev','init-system-helpers','nginx'], } package { 'nginx-full': ensure => '1.6.0-1+precise0', require => Package['libgd2-xpm','libgd2-xpm-dev','init-system-helpers','nginx-common'], } }
手动安装会导致相同的错误:
apt-get install nginx ... The following packages have unmet dependencies: nginx : Depends: nginx-full (>= 1.6.0-1+precise0) but it is not going to be installed or nginx-light (>= 1.6.0-1+precise0) but it is not going to be installed or nginx-extras (>= 1.6.0-1+precise0) but it is not going to be installed or nginx-naxsi (>= 1.6.0-1+precise0) but it is not going to be installed Depends: nginx-full (< 1.6.0-1+precise0.1~) but it is not going to be installed or nginx-light (< 1.6.0-1+precise0.1~) but it is not going to be installed or nginx-extras (< 1.6.0-1+precise0.1~) but it is not going to be installed or nginx-naxsi (< 1.6.0-1+precise0.1~) but it is not going to be installed E: Unable to correct problems, you have held broken packages.
如何解决它?
你有你的依赖关系落后。
nginx包需要安装这四个命名包中的一个,所以你应该确保其中的一个(例如nginx-full )被安装。 因为它可能是四个中的任何一个,所以没有select自动为你。