https://wiki.winehq.org/Building_Biarch_Wine_On_Ubuntu
apt-get install build-essential gcc-multilib libx11-dev:i386 libfreetype6-dev:i386 libxcursor-dev:i386 libxi-dev:i386 libxshmfence-dev:i386 libxxf86vm-dev:i386 libxrandr-dev:i386 libxinerama-dev:i386 libxcomposite-dev:i386 libglu1-mesa-dev:i386 libosmesa6-dev:i386 libpcap0.8-dev:i386 libdbus-1-dev:i386 libncurses5-dev:i386 libsane-dev:i386 libv4l-dev:i386 libgphoto2-dev:i386 liblcms2-dev:i386 gstreamer0.10-plugins-base:i386 libcapi20-dev:i386 libcups2-dev:i386 libfontconfig1-dev:i386 libgsm1-dev:i386 libtiff5-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libldap2-dev:i386 libgnutls-dev:i386 libjpeg-dev:i386
libc6-dev:i386 libfreetype6:i386 libfreetype6-dev:i386 libpng12-0:i386 libpng12-dev:i386 libxcursor-dev:i386 libxcursor1:i386 libxext-dev:i386 libxext6:i386 libxfixes-dev:i386 libxfixes3:i386 libxi-dev:i386
libxi6:i386 libxinerama-dev:i386 libxinerama1:i386 libxrandr-dev:i386 libxrandr2:i386 libxrender-dev:i386
libxrender1:i386 libxshmfence-dev:i386 libxshmfence1:i386 libxxf86vm-dev:i386 libxxf86vm1:i386
linux-libc-dev:i386 zlib1g:i386 zlib1g-dev:i386
libdbus-1-dev
libosmesa6-dev
libncursesw5-dev
libgstreamer1.0-dev
configure: libOSMesa 64-bit development files not found (or too old), OpenGL rendering in bitmaps won't be supported.
configure: OpenCL 64-bit development files not found, OpenCL won't be supported.
configure: libdbus 64-bit development files not found, no dynamic device support.
configure: lib(n)curses 64-bit development files not found, curses won't be supported.
configure: gstreamer-1.0 base plugins 64-bit development files not found, gstreamer support disabled
configure: OSS sound system found but too old (OSSv4 needed), OSS won't be supported.
configure: libcups 64-bit development files not found, CUPS won't be supported.
configure: fontconfig 64-bit development files not found, fontconfig won't be supported.
configure: libgsm 64-bit development files not found, gsm 06.10 codec won't be supported.
configure: WARNING: libgnutls 64-bit development files not found, no schannel support.
configure: Finished. Do 'make' to compile Wine.
以Ubuntu为例说明 一、安装安装lxc 1、安装lxc
sudo apt-get install lxc lxc-templates
2、现在创建一个32位的容器,并把目录绑定到容器:
sudo lxc-create -t ubuntu -n my32bitbox -- --bindhome $LOGNAME -a i386
3、然后启动容器;在控制台输入用户名和密码。
sudo lxc-start -n my32bitbox
4、在/etc/apt/sources.list中添加内容
sudo sh -c "sed s/deb/deb-src/ /etc/apt/sources.list >> /etc/apt/sources.list"
5、安装先决条件
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get build-dep wine # 如果失败使用 sh install-wine-deps.sh cd $HOME mkdir wine32 cd wine32 ~/wine-git/configure make -j4
6、关闭容器
sudo shutdown -h now
二、安装chroot Method 1、安装 sudo apt-get install schroot debootstrap 2、创建配置文件 sudo editor /etc/schroot/chroot.d/precise_i386.conf 3、添加内容 [precise_i386] description=Ubuntu Precise personality=linux32 directory=/srv/chroot/precise_i386 root-users=your_username type=directory users=your_username 4、创建的Ubuntu的chroot环境 sudo mkdir -p /srv/chroot/precise_i386 sudo debootstrap --variant=buildd --arch=i386 precise /srv/chroot/precise_i386 http://archive.ubuntu.com/ubuntu/ 5、使在chroot内apt-get的工作: sudo cp /etc/apt/sources.list /srv/chroot/precise_i386/etc/apt/ 6、进入chroot: schroot -c precise_i386 -u root 7、得到基础包 apt-get update apt-get install ubuntu-minimal sudo apt-get install software-properties-common 8、安装构建依赖关系: apt-get build-dep wine 如果报错:E: You must put some 'source' URIs in your sources.list 则执行 add-apt-repository ppa:ubuntu-wine/ppa apt-get update 9、下载Wine源 apt-get install git git clone git://source.winehq.org/git/wine 10、编译 cd wine ./configure make 11、运行 export DISPLAY=:0 ./wine notepad 12、在chroot外部执行 exit sudo apt-get install wine exit cd wine ./wine notepad 三、手动连接库的方法 1、执行下面代码 sudo apt-add-repository ppa:ehoover/compholio sudo apt-get update sudo apt-get install ia32-libs-dev 2、或者设置符号连接 cd /usr/lib/i386-linux-gnu sudo ln -s libfreetype.so.6 libfreetype.so sudo ln -s libX11.so.6 libX11.so sudo ln -s libXau.so.6 libXau.so sudo ln -s libXcursor.so.1 libXcursor.so sudo ln -s libXi.so.6 libXi.so sudo ln -s libXext.so.6 libXext.so sudo ln -s libXxf86vm.so.1 libXxf86vm.so sudo ln -s libXrandr.so.2 libXrandr.so sudo ln -s libXrender.so.1 libXrender.so sudo ln -s libXinerama.so.1 libXinerama.so sudo ln -s libXcomposite.so.1 libXcomposite.so sudo ln -s libGLU.so.1 libGLU.so sudo ln -s libOSMesa.so.6 libOSMesa.so sudo ln -s libgnutls.so.26 libgnutls.so sudo ln -s libsane.so.1 libsane.so sudo ln -s libv4l1.so.0 libv4l1.so sudo ln -s libv4l2.so.0 libv4l2.so sudo ln -s liblcms.so.[0-9] liblcms.so sudo ln -s libcapi20.so.3 libcapi20.so sudo ln -s libcups.so.2 libcups.so sudo ln -s libfontconfig.so.1 libfontconfig.so sudo ln -s libgsm.so.1 libgsm.so sudo ln -s libtiff.so.[0-9] libtiff.so sudo ln -s libmpg123.so.0 libmpg123.so sudo ln -s libodbc.so.1 libodbc.so sudo ln -s libopenal.so.1 libopenal.so sudo ln -s libldap-2.4.so.2 libldap.so sudo ln -s libldap_r-2.4.so.2 libldap_r.so sudo ln -s liblber-2.4.so.2 liblber.so sudo ln -s libxml2.so.2 libxml2.so sudo ln -s libxslt.so.1 libxslt.so sudo ln -s libssl.so.0.9.8 libssl.so sudo ln -s libcrypto.so.0.9.8 libcrypto.so sudo ln -s libjpeg.so.8 libjpeg.so sudo ln -s mesa/libGL.so libGL.so cd /usr/lib/i386-linux-gnu/mesa sudo ln -s libGL.so.1 libGL.so cd /lib/i386-linux-gnu sudo ln -s libdbus-1.so.3 libdbus-1.so sudo ln -s libpng12.so.0 libpng12.so sudo ln -s libncurses.so.5 libncurses.so 3、可能还需要的32位libraries sudo apt-get install libosmesa6:i386 libosmesa-dev libjpeg-turbo8-dev:i386