我正在尝试将 wine 安装到 Ubuntu 18.04,但是出现错误:
The following packages have unmet dependencies:
wine32:i386 : Depends: libwine:i386 (= 3.0-1ubuntu1) but it is not going to be installed
wine64 : Depends: libwine (= 3.0-1ubuntu1) but it is not going to be installed
即使当我尝试构建它时,我收到一条警告,说我需要 flex,而当我尝试安装 flex 时,我再次收到完全相同的错误。
我在网上看到一些人提到我可能弄乱了更新存储库,要么是错误的 Ubuntu 版本,要么是第三方的,我需要找到它然后清理它。但是,我对此一点也不熟悉,我列出了所有存储库,但我不知道应该删除哪一个以及如何删除它。
由于字符长度限制,此输出已被删除
编辑:根据要求,grep -v ^# /etc/apt/sources.list
deb http://tr.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://tr.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://tr.archive.ubuntu.com/ubuntu/ bionic universe
deb http://tr.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://tr.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://tr.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://tr.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu bionic partner
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
deb http://archive.canonical.com/ bionic partner
deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main
grep -v ^# /etc/apt/sources.list.d/*.list
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
/etc/apt/sources.list.d/teamviewer.list:
apt-缓存策略 wine32:i386 wine64 libwine:i386 wine32:i386:
Installed: 3.0-1ubuntu1
Candidate: 3.0-1ubuntu1
Version table:
*** 3.0-1ubuntu1 500
500 http://tr.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
100 /var/lib/dpkg/status
wine64:
Installed: 3.0-1ubuntu1
Candidate: 3.0-1ubuntu1
Version table:
*** 3.0-1ubuntu1 500
500 http://tr.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
100 /var/lib/dpkg/status
libwine:i386:
Installed: (none)
Candidate: 3.0-1ubuntu1
Version table:
3.0-1ubuntu1 500
500 http://tr.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
首先,我尝试安装冰茶
经过:
sudo apt-get install icedtea-plugin
我尝试通过以下方式安装 Wine:
sudo apt install wine-stable wine32
建造者:
git clone git://source.winehq.org/git/wine.git ~/wine-dirs/wine-source
cd ~/wine-dirs/wine-source/
../wine-source/configure --enable-win64
编辑2:
~$ apt-cache 策略 wine-stable
wine-stable:
Installed: 3.0-1ubuntu1
Candidate: 3.0-1ubuntu1
Version table:
*** 3.0-1ubuntu1 500
500 http://tr.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
500 http://tr.archive.ubuntu.com/ubuntu bionic/universe i386 Packages
100 /var/lib/dpkg/status
~$ dpkg -l | grep -i wine
ii q4wine 1.3.6-2 amd64 Qt GUI for wine (WINE)
iU wine-stable 3.0-1ubuntu1 all Windows API implementation - standard suite
rc wine1.6 1:1.6.2-0ubuntu14.2 amd64 Microsoft Windows Compatibility Layer (Binary Emulator and Library)
ii wine1.8 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1 amd64 Microsoft Windows Compatibility Layer (Binary Emulator and Library)
ii wine1.8-amd64 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1 amd64 Microsoft Windows Compatibility Layer (64-bit support)
ii wine1.8-i386:i386 1:1.8.0-0ubuntu1~ubuntu15.10.1~ppa1 i386 Microsoft Windows Compatibility Layer (32-bit support)
iU wine32:i386 3.0-1ubuntu1 i386 Windows API implementation - 32-bit binary loader
iU wine64 3.0-1ubuntu1 amd64 Windows API implementation - 64-bit binary loader
ii winetricks 0.0+20180217-1 all package manager for Wine to install software easily
编辑3:
$ sudo dpkg --add-architecture i386
$ sudo apt 更新
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease
Hit:4 http://dl.google.com/linux/chrome/deb stable Release
Hit:5 http://archive.canonical.com bionic InRelease
Get:6 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease [6.259 B]
Err:6 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
Get:8 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [38,5 kB]
Get:9 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [17,6 kB]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [41,5 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42,1 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16,4 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [111 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2.464 B]
Hit:15 http://tr.archive.ubuntu.com/ubuntu bionic InRelease
Hit:16 http://tr.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:17 http://tr.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
W: GPG error: https://dl.winehq.org/wine-builds/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 76F1A20FF987672F
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
~$ sudo apt 安装 wine-stable wine64 wine32:i386
wine64Reading package lists... Done
Building dependency tree
Reading state information... Done
wine-stable is already the newest version (3.0-1ubuntu1).
wine64 is already the newest version (3.0-1ubuntu1).
wine64 set to manually installed.
wine32:i386 is already the newest version (3.0-1ubuntu1).
wine32:i386 set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
wine32:i386 : Depends: libwine:i386 (= 3.0-1ubuntu1) but it is not going to be installed
wine64 : Depends: libwine (= 3.0-1ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
sudo apt purge wine1.6 wine1.8 wine1.8-amd64 wine1.8-i386:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
wine32:i386 : Depends: libwine:i386 (= 3.0-1ubuntu1) but it is not going to be installed
wine64 : Depends: libwine (= 3.0-1ubuntu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
答案1
问题是 Ubuntu 不附带安装“WINE”所需的一切。在这种情况下,它是 32 位依赖项。这就是为什么无论您做什么都会出现此错误的原因。
我看到的互联网上的所有解决方案都是基于你是否错过了一些步骤。但在从不同来源做了数千次同样的事情后,我意识到还有其他问题。
首先,我使用以下命令从我的计算机中卸载了整个 wine 依赖项、源和库:
sudo apt-get --purge remove wine
这并不能完全删除 wine,因此我访问了以下目录并删除了以下文件:
cd $HOME
rm -r .wine
rm .config/menus/applications-merged/wine*
rm -r .local/share/applications/wine
rm .local/share/desktop-directories/wine*
rm .local/share/icons/????_*.xpm
如果你愿意,可以再次运行此命令:
sudo apt-get --purge remove wine
然后我运行此命令来纠正所有损坏的文件
sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
之后我在谷歌上搜索“如何在 ubuntu 20 中启用 32 位架构”,我来到了这个网站:https://support.humblebundle.com/hc/en-us/articles/202759400-Installing-32-bit-libs-on-a-64-bit-Linux-system
它说要在 Ubuntu 12 或更低版本中安装它,我们必须在终端中运行此命令:
sudo apt-get install ia32-libs
对于新版本:
sudo apt-get install lib32z1
我有 Ubuntu 20,所以我选择了第二种方法。在此之后,正如Wine 的官方网站我继续进行并神奇地安装了葡萄酒。
答案2
对我来说,似乎您忘记将 i386 架构添加到 支持的 CPU 架构列表中dpkg
。
我建议使用以下命令添加此 CPU 架构:
sudo dpkg --add-architecture i386
sudo apt update
然后按照您已经要求的那样安装 wine:
sudo apt install wine-stable wine64 wine32:i386 wine64
或者如果你需要安装最新的 Wine - 请按照Ubuntu 版 WineHQ 官方指南但改变仿生的到赛尼尔(作为仿生的包无法安装) 如下:
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository -r "deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main"
# ^ remove broken repository for 18.04 LTS
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ xenial main'
# ^ add 16.04 LTS repository instead
## Install one of WineHQ packages:
# Stable branch
sudo apt install --install-recommends winehq-stable
#Development branch
#sudo apt install --install-recommends winehq-devel
#Staging branch
#sudo apt install --install-recommends winehq-staging
你也可以选择使用以下命令删除旧版本的 Wine 软件包
sudo apt purge wine1.6 wine1.8 wine1.8-amd64 wine1.8-i386:i386