如何在64位Ubuntu上编译32位Wine应用程序?

如何在64位Ubuntu上编译32位Wine应用程序?,ubuntu,apt,wine,Ubuntu,Apt,Wine,试图在Ubuntu 20.10上编译32位Wine应用程序(WineCc-m32)在链接阶段失败,出现以下错误: /usr/bin/ld: relocatable linking with relocations from format elf64-x86-64 (/usr/lib/x86_64-linux-gnu/wine/libwinecrt0.a(stub.o)) to format elf32-i386 (xxx.o) is not supported 它来自安装的libwinecrt

试图在Ubuntu 20.10上编译32位Wine应用程序(
WineCc-m32
)在链接阶段失败,出现以下错误:

/usr/bin/ld: relocatable linking with relocations from format elf64-x86-64
(/usr/lib/x86_64-linux-gnu/wine/libwinecrt0.a(stub.o)) to format elf32-i386 (xxx.o) is not supported
它来自安装的
libwinecrt0.a
是64位版本

根据
apt文件搜索libwinecrt0.a
,该库的相关apt包为。但是,由于其依赖项似乎需要替换C库(???),因此无法安装:

$ sudo apt install libwine-dev:i386
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:
 libc6-dev:i386 : Depends: linux-libc-dev:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

因此,如何使用APT软件包在64位Ubuntu上编译(并链接)32位Wine应用程序?

我目前通过手动安装32位
。deb

sudo dpkg -i libwine-dev_5.0-3ubuntu1_i386.deb
这使得
winegcc-m32
找到了正确的库并成功构建了32位应用程序,但还远远不够理想,因为我现在的APT设置已损坏:

$ sudo apt upgrade
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:
 libwine-dev:i386 : Depends: libc6-dev:i386 but it is not installed or
                             libc6.1-dev:i386 but it is not installable or
                             libc0.3-dev:i386 but it is not installable or
                             libc0.1-dev:i386 but it is not installable or
                             libc-dev:i386
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
因此需要一个更好的解决方案