How to Add i386 Architecture in Ubuntu MATE 15.04

aptdpkgpackage-managementplayonlinuxwine

So I want to install wine:i386 so I can use PlayOnLinux.

http://wiki.playonlinux.com/index.php/Installing_PlayOnLinux

For users' Debian wheezy and Ubuntu Precise (and higher), they'll need to install the i386 version of Wine. For this, we must enable support for i386 in your repository manager.

sudo echo "foreign-i386 architecture"> /etc/dpkg/dpkg.cfg.d/multiarch simply returned nothing and jumped to the next line. I checked the file later and it had been edited to contain the line "foreign-i386 architecture".

sudo apt-get update worked just fine.

sudo apt-get install wine:i386 returned
Do you want to continue? [Y/n] y after which it returned:

Extracting templates from packages: 100%
Preconfiguring packages ...
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-i386'
E: Sub-process /usr/bin/dpkg returned an error code (2)

"unknown option 'foreign-i386'".

How can I resolve this?

P.S. I'm very new to Linux, please be patient.

Best Answer

Check that the only file in the below folder is multiarch using:-

ls /etc/dpkg/dpkg.cfg.d/

See if the output is multiarch. If the output is multiarch then run below:-

sudo sh -c "echo 'foreign-architecture i386' > /etc/dpkg/dpkg.cfg.d/multiarch"

NOTE:- First, check the output of uname -m, if it is already i386, then no-need to follow above steps, i.e, i386 is enabled by default.