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.

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer
    
The ls command returned nothing, I went to the folder manually through the file manager and certainly, there was nothing there. – Ketchup901 Jun 9 '15 at 4:42
    
What is the output of uname -m ? – Sharad Gautam Jun 9 '15 at 5:15
    
i686. This is a sentence so the comment is long enough. – Ketchup901 Jun 9 '15 at 15:16
    
@AdamGenell Then you don't need to do anything, just do this sudo apt-get install wine . You should have check it first :) BTW Accept one of the answer as they both should have worked! – Sharad Gautam Jun 9 '15 at 15:24
    
What you said is that if the output was i386 then I wouldn't have to do anything. The output was i686. – Ketchup901 Jun 10 '15 at 5:10

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.

share|improve this answer
    
That returns dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-i386' – Ketchup901 Jun 8 '15 at 7:39
    
This "--foreign-architecture" is the old method. The new one is "--add-architecture" See: manpages.ubuntu.com/manpages/vivid/man1/dpkg.1.html – Rinzwind Jun 8 '15 at 9:23
    
@AdamGenell please try the edit (that one should work) – Rinzwind Jun 8 '15 at 9: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. – erm3nda May 27 '17 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.