安装Wine 1.5:configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries

jao*_*bal 38 wine software-installation

    Wine Installer v1.0

Warning !! wine binary (still) found, which may indicate
a (conflicting) previous installation.
You might want to abort and uninstall Wine first.
(If you previously tried to install from source manually, 
run 'make uninstall' from the wine root directory)

We need to install Wine as the root user. Do you want us to build Wine,
'su root' and install Wine?  Enter 'no' to build Wine without installing:
(yes/no) yes
Running configure...

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for cpp... cpp
checking whether gcc -m32 works... no
configure: error: Cannot build a 32-bit program, you need to install 32-bit development libraries.

Configure failed, aborting install.
Run Code Online (Sandbox Code Playgroud)

我该如何解决这个问题?

小智 37

我猜您使用的是现在支持多架构的 Ubuntu 12.04 x64。换句话说,在 64 位系统上,您只能构建 Wine-x64 版本。就目前而言,在 Ubuntu 12.04 x64 上构建 32 位 Wine 似乎太麻烦了。

所以只需运行这个命令:

./configure --enable-win64
Run Code Online (Sandbox Code Playgroud)

  • 那不是建立 wine64 而不是 wine 吗?我无法使用 wine64 运行 Windows 32 位程序。 (7认同)
  • 现在,wine 需要 `flex` 和 `bison`,所以首先 `sudo apt install flex bison` 但是的,这是最好的答案。 (2认同)

Gau*_*ier 21

根据:https : //stackoverflow.com/a/17748092/108802

您需要安装 gcc-multilibs。

sudo apt-get install gcc-multilib g++-multilib
Run Code Online (Sandbox Code Playgroud)

然后 [...] 指定 32 位主机并传递 32 位编译标志:

./configure --host=i686-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
Run Code Online (Sandbox Code Playgroud)


小智 5

尝试安装 32 位依赖项

sudo apt-get install ia32-libs
sudo apt-get install gcc-multilib g++-multilib
sudo apt-get install xserver-xorg-dev:i386 libfreetype6-dev:i386
Run Code Online (Sandbox Code Playgroud)