Ubuntu 20.04 安装 Wine 时软件包已降级,看不到新版本

Ubuntu 20.04 安装 Wine 时软件包已降级,看不到新版本

自从安装 Ubuntu 20.04 以来,我一直遇到奇怪的问题。最近,我试图用 wine 玩游戏。Wine 无法正常工作,并不断出现奇怪的错误。因此,我卸载了它sudo apt-get remove wine并尝试重新安装。这也失败了,并显示一条有关损坏的保留包(我当时没有想到要保存这些消息,所以请耐心等待)和依赖性问题的消息。类似于wine requires wine64/wine32 which will not be installed.

我完全糊涂了。无论如何,经过几个小时的谷歌搜索,什么都没用,所以我尝试手动安装这些软件包sudo apt-get。然而,当我尝试安装 wine64 时,发生了以下情况:

$ sudo apt-get install wine64
[sudo] password for [omitted]: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  [omitted, large list of standard "support" type packages]
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  wine
Suggested packages:
  q4wine winbind winetricks playonlinux wine-binfmt dosbox exe-thumbnailer
  | kio-extras wine64-preloader
Recommended packages:
  wine32
The following packages will be REMOVED:
  bind9-dnsutils calibre calibre-bin deja-dup discord eog evince file-roller
  firefox fraidycat fwupd fwupd-signed gnome-calendar gnome-logs graphviz
  gstreamer1.0-packagekit haguichi inkscape libepub0 libevdocument3-4
  libevview3-3 libkf5filemetadata-bin liblove0 libmagickcore-6.q16-6-extra
  libopusfile0 libpodofo0.9.6 libproxy1-plugin-gsettings
  libproxy1-plugin-networkmanager libreoffice-gnome libreoffice-gtk3
  libsdl2-mixer-2.0-0 libssl-dev libtss2-esys0 libzip5 linux-generic-hwe-20.04
  linux-headers-5.8.0-34-generic linux-headers-5.8.0-36-generic
  linux-headers-generic-hwe-20.04 love nautilus-image-converter netplan.io
  obs-studio peek qemu-system qemu-system-arm qemu-system-mips
  qemu-system-misc qemu-system-ppc qemu-system-s390x qemu-system-sparc
  qemu-system-x86 rsyslog samba shotwell simple-scan spice-vdagent
  squashfs-tools teams transmission-gtk ubuntu-desktop ubuntu-desktop-minimal
  ubuntu-minimal ubuntu-standard uuid-runtime vino whoopsie
The following NEW packages will be installed:
  wine wine64
0 upgraded, 2 newly installed, 66 to remove and 0 not upgraded.
Need to get 266 kB of archives.
After this operation, 1,826 MB disk space will be freed.
Do you want to continue? [Y/n] Y

我没有真正阅读上面的内容,只是按下 Y,然后我使用的很多程序都被删除了,比如 libreoffice 和 Firefox。惊慌失措的我重新安装了它们sudo apt-get,但现在 Firefox 停留在版本 75(当前版本是 84),libreoffice 也落后了几个版本,我所做的一切都无法让我“看到”这些软件包的新版本。Apt-get 似乎甚至不知道它们的存在,并不断告诉我我使用的是每个软件包的最新版本。我安装了 synaptic 和 aptitude(它们安装正常),它们还告诉我我拥有每个软件包的最新版本。奇怪的是,其他软件包(如 discord)已完全正常安装。此时,我不知道发生了什么。

任何帮助都将不胜感激。我将使用人们希望我运行的任何命令的输出来编辑此帖子。

编辑 1:结果apt-cache policy wine64 wine32 wine

wine64:
  Installed: (none)
  Candidate: 5.0-3ubuntu1
  Version table:
     5.0-3ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
wine32:i386:
  Installed: (none)
  Candidate: 5.0-3ubuntu1
  Version table:
     5.0-3ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages
wine:
  Installed: (none)
  Candidate: 5.0-3ubuntu1
  Version table:
     5.0-3ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu focal/universe i386 Packages

编辑2:来源

/etc/apt/source.list:deb http://archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/source.list:deb http://security.ubuntu.com/ubuntu/ focal-security main restricted
/etc/apt/source.list:deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu focal main universe restricted
/etc/apt/sources.list.d/webupd8team-ubuntu-haguichi-focal.list:deb http://ppa.launchpad.net/webupd8team/haguichi/ubuntu focal main
/etc/apt/sources.list.d/bartbes-ubuntu-love-stable-focal.list:deb http://ppa.launchpad.net/bartbes/love-stable/ubuntu focal main
/etc/apt/sources.list.d/sublime-text.list:deb https://download.sublimetext.com/ apt/stable/
/etc/apt/sources.list.d/obsproject-ubuntu-obs-studio-focal.list:deb http://ppa.launchpad.net/obsproject/obs-studio/ubuntu focal main
/etc/apt/sources.list.d/skype-stable.list:deb [arch=amd64] https://repo.skype.com/deb stable main
/etc/apt/sources.list.d/teams.list:deb [arch=amd64] https://packages.microsoft.com/repos/ms-teams stable main

答案1

尝试在终端中粘贴并运行以下命令:

sudo dpkg --add-architecture i386 
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo apt install --install-recommends winehq-stable
dpkg-reconfigure wine-stable-amd64 wine-stable wine-stable-i386

相关内容