如何解锁被 Muon 锁定的包裹

如何解锁被 Muon 锁定的包裹

我使用 Muon 包管理器将包锁定到特定版本,但是当我尝试释放锁定时,收到消息“无法锁定包代码。无法写入锁定文件。”

错误信息

也是sudo apt-mark showhold空的。我尝试清除包并重新安装,但它仍然安装锁定版本。

如果我强制它安装特定版本,这可以工作,但随后apt dist-upgrade想要降级该软件包:

Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Get:2 https://deb.nodesource.com/node_19.x jammy InRelease [4,563 B]                                                                                                                                                                       
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease                                                                                                                                                                             
Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease                                                                                                                                                                           
Hit:5 http://archive.ubuntu.com/ubuntu jammy-security InRelease                                                                                                                                                                            
Ign:6 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 InRelease                                                                                                                                                                 
Hit:7 https://download.sublimetext.com apt/stable/ InRelease                                                                                      
Hit:8 http://packages.microsoft.com/repos/code stable InRelease                                                             
Hit:9 https://deb.opera.com/opera-stable stable InRelease                                 
Hit:10 https://linux-clients.seafile.com/seafile-deb/jammy stable InRelease
Hit:11 https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 Release
Fetched 4,563 B in 1s (3,842 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  vlc-plugin-qt libvlc5 vlc-data gsasl-common libvlccore9 vlc imagemagick
  vlc-bin vlc-l10n libopenexr25 libpostproc55 libmagickcore-6.q16-6-extra
  vlc-plugin-samba libgsasl7 libavcodec58 libmagickwand-6.q16-6
  vlc-plugin-notify libavutil56 imagemagick-6.q16 libswscale5 libeditorconfig0
  libmagickcore-6.q16-6 vlc-plugin-access-extra vlc-plugin-skins2
  vlc-plugin-video-splitter libswresample3 imagemagick-6-common
  vlc-plugin-video-output libavformat58 libvlc-bin vlc-plugin-base
  vlc-plugin-visualization libavfilter7
Learn more about Ubuntu Pro at https://ubuntu.com/pro
The following packages have been kept back:
  libssl3 openssl
The following packages will be DOWNGRADED:
  code
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 2 not upgraded.
E: Packages were downgraded and -y was used without --allow-downgrades.

这个包裹上装了什么类型的锁?我怎样才能将其取下来?

编辑:

以下是输出apt policy code

apt policy code
code:
  Installed: 1.85.1-1702462158
  Candidate: 1.85.1-1702462158
  Version table:
     1.85.2-1705561292 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
 *** 1.85.1-1702462158 1001
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
        100 /var/lib/dpkg/status
     1.85.0-1701902998 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.84.2-1699528352 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.84.1-1699275408 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.84.0-1698839401 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.83.1-1696982868 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.83.0-1696350811 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.82.3-1696245001 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.82.2-1694671812 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.82.1-1694163687 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.82.0-1694039253 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.81.1-1691620686 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.81.0-1690980880 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.80.2-1690491597 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.80.1-1689183569 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.80.0-1688479026 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.79.2-1686734195 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.79.1-1686587647 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.79.0-1686149120 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.78.2-1683731010 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.78.1-1683194560 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.78.0-1683145611 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.77.3-1681292746 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.77.2-1680777128 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.77.1-1680651665 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.77.0-1680085573 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.76.2-1678817801 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.76.1-1678294265 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.76.0-1677667493 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.75.1-1675893397 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.75.0-1675266613 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.74.3-1673284829 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.74.2-1671533413 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.74.1-1671015296 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.74.0-1670260027 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.73.1-1667967334 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.73.0-1667318785 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.72.2-1665614327 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.72.1-1665423861 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.72.0-1664926972 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.71.2-1663191218 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.71.1-1662667267 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.71.0-1662018389 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.70.2-1660629410 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.70.1-1660113095 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.70.0-1659589288 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.69.2-1658162013 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.69.1-1657615746 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.69.0-1657183742 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.68.1-1655263094 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.68.0-1654690107 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.67.2-1652812855 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.67.1-1651841865 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.67.0-1651667246 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.66.2-1649664567 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.66.1-1649257842 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.66.0-1648620611 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.65.2-1646927742 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.65.1-1646706496 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.65.0-1646220682 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.64.2-1644445741 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.64.1-1644255817 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.64.0-1643863948 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.63.2-1639562499 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.63.1-1639448820 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.63.0-1638855526 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.62.3-1637137107 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.62.2-1636665017 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.62.1-1636111026 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.62.0-1635954068 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.61.2-1634656828 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.61.1-1634175470 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.61.0-1633631387 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.60.2-1632313585 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.60.1-1631294805 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.60.0-1630494279 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.59.1-1629375198 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.59.0-1628120042 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.58.2-1626302803 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.58.1-1626158276 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.58.0-1625728071 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.57.1-1623937013 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.57.0-1623259737 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.56.2-1620838498 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.56.1-1620296372 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.56.0-1620166262 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.55.2-1618307277 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.55.1-1617808414 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.55.0-1617120720 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.54.3-1615806378 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.54.2-1615424848 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.54.1-1614898113 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.54.0-1614738538 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.53.2-1613044664 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.53.1-1612827767 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.53.0-1612368357 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.52.1-1608136922 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.52.0-1607640828 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages
     1.51.1-1605051630 500
        500 http://packages.microsoft.com/repos/code stable/main amd64 Packages

答案1

“保留”包的一种方法是将其“固定”,方法是在 中放置适当的条目/etc/apt/preferences.d。条目中的值 1001 表示不会更新它。

您可以通过删除以下条目来“取消固定”该包:/etc/apt/preferences.d

https://help.ubuntu.com/community/PinningHowto了解具体情况。

相关内容