I have Ubuntu 14.04, and I'm trying to install wine:i386 to use PlayOnLinux, following this article. However, when I run:
sudo echo "foreign-i386 architecture"> /etc/dpkg/dpkg.cfg.d/multiarch
I get this error /etc/dpkg/dpkg.cfg.d/multiarch: Permission denied
Being still new to Ubuntu I don't know how safe it is (or advisable) to manually change permissions to overcome this. What should I do to solve this?
EDIT The main objective of this question is to install Wine, not the syntax itself (although the syntax was the problem), the accepted answer provided a better way of solving this.
You have two problems:
/etc/dpkg/dpkg.cfg.d/multiarch
file is being opened by the shell as unprivileged user before theecho
command runs, hence the permission error as onlyroot
should be able to create the file or write in it. Thesudo
is only being applied toecho
command.The string
foreign-i386 architecture
is not correct for enabling multiarch support fori386
architecture, the correct string isforeign-architecture i386
.To fix these, you can do:
Or
Note that, the easiest way to enable multiarch and add
i386
architecture would be:Don't forget to run
sudo apt-get update
after enabling multiarch.