
我想在 Elementaryos Hera 中安裝 Wine 並按照此操作地點。我犯的唯一錯誤是,我從 Ubuntu 儲存庫安裝了 wine,然後嘗試從官方 wine 儲存庫安裝 wine。然後,我使用命令安裝了 wineHQ stablesudo apt-get install --install-recommends winehq-stable
因為我安裝了兩次 wine,所以它沒有正常工作。因此,我進入終端並使用命令dpkg --list
查看安裝了哪些基於 wine 的軟體,並使用命令卸載了它們,sudo apt-get --purge remove program
我實際上卸載了所有已安裝的軟體葡萄酒以它的名義。現在,我從官方儲存庫重新安裝了 Wine,然後添加了 WineHQ Stable 的金鑰,然後嘗試使用上面提到的第一個命令來安裝它。但我收到了這則訊息
thenotorious@T430:~$ sudo apt-get install --install-recommends winehq-stable
[sudo] password for thenotorious:
Reading package lists... Done
Building dependency tree
Reading state information... 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:
winehq-stable : Depends: wine-stable (= 5.0.1~bionic)
E: Unable to correct problems, you have held broken packages.
我該如何解決這個問題?有人幫幫我吧。我已經搜尋過如何刪除損壞的軟體包,但只是找不到我應該刪除的軟體包,因為我已經卸載並可能刪除了wine 的每個資料夾,並且還搜尋了有關由於損壞而無法安裝wineHQ stable的論壇包,但沒有任何真正的幫助。
答案1
首先卸載Wine
若要刪除 wine 6.0,請在終端機中執行命令:
sudo apt remove --auto-remove winehq-stable
再次安裝 wine (執行以下命令)
sudo dpkg --add-architecture i386
wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' (only Ubuntu 20.04)
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ groovy main' (only Ubuntu 20.10)
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main' (only Ubuntu 18.04)
sudo apt update && sudo apt install --install-recommends winehq-stable
答案2
winehq-stable
我在官方儲存庫中找不到。它看起來像是來自 ppa 或您是從 wine.org 安裝它。
查找時遇到問題wine-stable
。我發現它確實存在於官方仿生儲存庫。 wine-stable
位於該universe
部分。
此universe
部分適用於 ubuntu 核心團隊不支援的軟體包。系統預設情況下不啟用它。檢查您的/etc/apt/sources.list
或/etc/apt/sources.list.d/*
.如果您沒有看到類似下面的內容,請繼續添加它(更改 URL 以匹配其他條目使用的鏡像)。
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://nl.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://nl.archive.ubuntu.com/ubuntu/ bionic universe
加入完畢後,繼續apt update
,然後再試一次。如果您再次遇到問題,請嘗試apt --fix-broken install
。