apt dist-upgrade 想要安装已通过 snap 安装的 Firefox

apt dist-upgrade 想要安装已通过 snap 安装的 Firefox

在 Ubuntu 22.04 中,我通过 snap 默认安装了 firefox 115.0.2(据我所知,这是迄今为止的最新版本)(which firefox返回“/snap/bin/firefox”)。

然而,当我尝试使用 apt 执行 dist-upgrade ( sudo apt dist-upgrade) 时,它会将 Firefox 安装为一个新包(而不是升级包)。

我取消了 apt 命令,因为我不明白为什么会出现这种情况。有人知道为什么 apt 建议重新安装吗?继续安装安全吗?

感谢您的帮助

特多姆

以下是 Raffa 要求的输出列表(感谢他),抱歉,它是从法语自动翻译而来的,但应该很容易理解:

$ sudo apt update
     Reached:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
     Reached:2 http://fr.archive.ubuntu.com/ubuntu jammy InRelease
     Reached:3 http://fr.archive.ubuntu.com/ubuntu jammy-updates InRelease
     Reached:4 http://fr.archive.ubuntu.com/ubuntu jammy-backports InRelease
     Reading package lists... Done
     Building the dependency tree... Done
     Reading status information... Done
     35 packages can be updated. Run “apt list --upgradable” to see them.


$ sudo apt dist-upgrade

         Reading package lists... Done
     Building the dependency tree... Done
     Reading status information... Done
     Calculating the update... Done
     The following packages were installed automatically and are no longer needed:
       fonts-dejavu fonts-dejavu-extra
     Please use "sudo apt autoremove" to remove them.
     Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
       libpostproc55 libavcodec58 libavutil56 libswscale5 libswresample3
       libavformat58 libavfilter7
     Learn more about Ubuntu Pro at https://ubuntu.com/pro
    
     An OpenSSL vulnerability has recently been fixed with USN-6188-1 & 6119-1:
     CVE-2023-2650: possible DoS translating ASN.1 object identifiers.
     Ensure you have updated the package to its latest version.
    
     The following NEW packages will be installed:
       firefox
     The following packages have been retained:
       gjs libgjs0g
     The following packages will be updated:
       alsa-ucm-conf gir1.2-adw-1 gir1.2-gnomedesktop-3.0 gir1.2-mutter-10 gnome-desktop3-data gnome-shell gnome-shell-common initramfs-tools initramfs-tools-bin initramfs-tools-core libadwaita-1-0
       libgnome-bg-4-1 libgnome-desktop-3-19 libgnome-desktop-4-1 libidn12 libinput-bin libinput10 libmm-glib0 libmutter-10-0 libspeechd2 modemmanager mutter-common python3-debian python3-speechd
       speech-dispatcher speech-dispatcher-audio-plugins speech-dispatcher-espeak-ng ubuntu-advantage-tools ubuntu-desktop ubuntu-desktop-minimal ubuntu-drivers-common ubuntu-minimal ubuntu-standard
     33 updated, 1 newly installed, 0 to be removed and 2 not updated.
     It is necessary to take 9001 KB from the archives.
     After this operation, an additional 375 kB of disk space will be used.
     Would you like to continue ? [We]

$ apt list --installed firefox
     Listing... Done

$ snap list firefox
     Name Version Revision Tracking Editor Notes
     firefox 115.0.2-1 2908 latest/stable/… mozilla✓ -

$ apt show firefox
     Package: firefox
     Version: 1:1snap1-0ubuntu2
     Priority: optional
     Department: website
     Origin: Ubuntu
     Maintainer: Ubuntu Mozilla Team <[email protected]>
     Bugs: https://bugs.launchpad.net/ubuntu/+filebug
     Installed-Size: 261 kB
     Provides: gnome-www-browser, iceweasel, www-browser, x-www-browser
     Pre-Depends: debconf, snapd
     Depends: debconf (>= 0.5) | debconf-2.0
     Breaks: firefox-dbg (<< 1:1snap1), firefox-dev (<< 1:1snap1), firefox-geckodriver (<< 1:1snap1), firefox-mozsymbols (<< 1:1snap1)
     Replaces: firefox-dbg (<< 1:1snap1), firefox-dev (<< 1:1snap1), firefox-geckodriver (<< 1:1snap1), firefox-mozsymbols (<< 1:1snap1)
     Task: xubuntu-live, ubuntukylin-desktop
     Download-Size: 72.3 kB
     APT-Sources: http://fr.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
     Description: Transitional package - firefox -> firefox snap
      This is a transitional dummy package. It can safely be removed.
      .
      firefox is now replaced by the firefox snap.

答案1

我确实刷新了我的 FireFox snap 安装,结果发现最新版本确实是115.0.2-1

您的apt show firefox输出显示正常的预期包信息:

Description: Transitional package - firefox -> firefox snap
      This is a transitional dummy package. It can safely be removed.
      .
      firefox is now replaced by the firefox snap.

该包可以被删除,根据输出结果来看你似乎做了同样的事:

$ apt list --installed firefox
  Listing... Done

并且可以安全地安装/重新安装...因此,继续升级不应添加新的 FireFox 副本,也不会更改当前安装的副本...但是,我会使用它upgrade来代替dist-upgrade

至于为什么 APT 尝试安装它,根据您提供的信息我并不清楚。

相关内容