4

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.

2 Answers2

8

To resolve it, run this command:

sudo dpkg --add-architecture i386

Or, if fails, you can still add it using the other answer's method below.

Frantique
  • 8,493
  • That returns dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-i386' – Ketchup901 Jun 08 '15 at 07:39
  • 1
    This "--foreign-architecture" is the old method. The new one is "--add-architecture" See: http://manpages.ubuntu.com/manpages/vivid/man1/dpkg.1.html – Rinzwind Jun 08 '15 at 09:23
  • @AdamGenell please try the edit (that one should work) – Rinzwind Jun 08 '15 at 09:43
  • @AdamGenell just remove the multiarch file before you try to add it, because it's reading foreign-architecture and that's the reason to do not continue. – m3nda May 27 '17 at 14:57
3

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.