Building 32-bit Wine on a 64-bit Ubuntu system2014-04-22 16:04:28
I have been trying to install Wine on my 13.04 64 bit computer, and everytime it leads to synaptic asking for the uninstall of the entire system.
I have been following some questions which suggest the addition of the Wine repository (also recomended on the WineHQ) website, followed by
sudo apt-get update and
sudo apt-get install wine1.5.
The system cries, with the following messages:
[php]root@ludis-Lenovo-IdeaPad-Y485:/home/ludis# sudo apt-get install wine1.5
Building dependency tree
Reading state information … done
Some packages could not be installed. This can mean
you have requested an impossible situation or if you are using
the unstable distribution that some required packages have not yet
created or are not moved out of Incoming.
The following information should help you to resolve the situation:
The following packages have unmet dependencies:
wine: Depends: wine1.6 but will not be installed or
wine1.7 but will not install
E: Unable to correct problems, faulty packets mode "keep state".[/php]
I have tried all
sudo apt-get autoclean and
sudo apt-get autoremove and
sudo apt-get update. However, the problem seems to continue. Any clues?
Finally, i solved by google:
The basic approach is:
1.build 64 bit wine
2.build 32 bit tools in lxc
3.build 32 bit wine in lxc, referring to the 64 bit wine and 32 bit tools built in the previous steps
4.install 32 bit wine
5.install 64 bit wine
Get the source, e.g.
git clone git://source.winehq.org/git/wine.git ~/wine-git[/php]
Get the 64 bit prerequisites, e.g.
[php]sudo apt-get build-dep wine[/php]
Build 64 bit wine, e.g.
[php]sudo apt-get install lxc[/php]
Create a 32 bit container, and tell it to bind your home directory into the container:
[php]sudo lxc-create -t ubuntu -n my32bitbox — –bindhome $LOGNAME -a i386[/php]
Start the container; at the console login prompt it gives you, log in with your username and password.
[php]sudo lxc-start -n my32bitbox[/php]
Now you’re inside the container, in your real home directory. Do an out-of-tree build of Wine as normal, just to get the tools. You’ll have to install all the needed prerequisites first. For instance:
[php]sudo apt-get install python-software-properties
sudo apt-get build-dep wine
sudo apt-get install git-core
Still inside the container, do it again, this time pointing to the 64 bit build for data, and the 32 bit tools build for tools:
~/wine-git/configure –with-wine64=$HOME/wine64 –with-wine-tools=$HOME/wine32-tools
Still inside the container, install the 32 bit wine to force the last little bit of building:
sudo make install[/php]
Still inside the container, shut down the container with the command
[php]sudo shutdown -h now[/php]
This drops you back out into your real machine. Finally, install into your real machine:
sudo make install
sudo make install[/php]
And you’re done!
Note: You don’t need LXC, you can simply use a chroot.