1

While installing Odoo v9 in Ubuntu 16.04 I got this error:

E: Sub-process /usr/bin/dpkg returned an error code (2)

This is not the first time. I got the same error a while ago, I tried this solution: 'How can I fix E: Sub-process /usr/bin/dpkg returned an error code (2)?', but after that I needed to reinstall Ubuntu because of a chown: setuid 0 error. After reinstalling when I again tried to install Odoo v9 it gave me the same error.

karel
  • 114,770

1 Answers1

2

Open the terminal and type:

sudo apt-get update  
sudo apt-get upgrade  
sudo ufw allow ssh # for the purpose of remote management you need ssh and openssh-server
sudo ufw allow 8069/tcp  
sudo ufw enable  
echo "deb http://nightly.openerp.com/9.0/nightly/deb/ ./" | sudo tee /etc/apt/sources.list
sudo apt-get update
sudo apt-get install odoo
sudo service odoo start

You can now access Odoo from: yourIP:8069
Example: http://162.243.69.108:8069

Update: Odoo is actively maintained and gets updated regularly. The current latest stable version is Odoo 11. The link to get it is: http://nightly.odoo.com/11.0/nightly/deb/ and when installing Odoo 11 the third line in the above code block should be changed accordingly.

karel
  • 114,770