Debian Buster:Ngnix 不会升级到 1.18,冲突:nginx-common

Debian Buster:Ngnix 不会升级到 1.18,冲突:nginx-common

在更新和升级服务器上的所有软件包后,我无法更新Nginx。

Debian Buster 软件包的 Nginx 版本为 1.14,但我想升级到最新稳定版本 1.18,它不属于 debian.org 上的 Buster 软件包。因此,我在 sources.list 中添加了以下几行:

deb http://nginx.org/packages/debian/ buster nginx
deb-src http://nginx.org/packages/debian/ buster nginx

我对 Linux 了解不多,所以我可能使用了错误的术语或不了解升级的机制。

sudo apt upgrade nginx

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... 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:
 nginx : Conflicts: nginx-common but 1.14.2-2+deb10u3 is to be installed
E: Broken packages

sudo apt --fix-broken install没有帮助。

apt-cache policy nginx

nginx:
  Installed: 1.14.2-2+deb10u3
  Candidate: 1.18.0-2~buster
  Version table:
     1.18.0-2~buster 500
        500 http://nginx.org/packages/debian buster/nginx amd64 Packages
     1.18.0-1~buster 500
        500 http://nginx.org/packages/debian buster/nginx amd64 Packages
     1.16.1-1~buster 500
        500 http://nginx.org/packages/debian buster/nginx amd64 Packages
     1.16.0-1~buster 500
        500 http://nginx.org/packages/debian buster/nginx amd64 Packages
 *** 1.14.2-2+deb10u3 500
        500 http://deb.debian.org/debian buster/main amd64 Packages
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
        100 /var/lib/dpkg/status

sources.list我添加了最后两行 nginx.org 内容:

deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main
deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main
deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main
deb http://deb.debian.org/debian buster-backports main
deb-src http://deb.debian.org/debian buster-backports main
deb http://nginx.org/packages/debian/ buster nginx
deb-src http://nginx.org/packages/debian/ buster nginx

相关内容