Install Odoo 11 on Ubuntu 16.04

Hello Everyone. Below you will find the easiest installation guide of odoo 11.  Hurry up ! Install Odoo 11 on your Ubuntu 16.04. EXPLORE AMAZING NEW FEATURES OF “Odoo 11″. To know What’s New in Odoo 11 Click Here

Step 1

Update apt source list

sudo apt-get update

Step 2

Install Updates

sudo apt-get -y upgrade
The -y flag will confirm that we are agreeing for all items to be installed.

Step 3

Install Python Dependencies for Odoo 11

sudo apt-get install python3-pip

INSTALL DEPENDENCIES USING PIP3
pip3 install Babel decorator docutils ebaysdk feedparser gevent greenlet html2text Jinja2 lxml Mako MarkupSafe mock num2words ofxparse passlib Pillow psutil psycogreen psycopg2 pydot pyparsing PyPDF2 pyserial python-dateutil python-openid pytz pyusb PyYAML qrcode reportlab requests six suds-jurko vatnumber vobject Werkzeug XlsxWriter xlwt xlrd

Step 4

Odoo Web Dependencies

sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
sudo apt-get install node-less

Step 5

Install PostgreSQL 9.6+

sudo apt-get install python-software-properties
sudo vim /etc/apt/sources.list.d/pgdg.list
add a line for the repository
deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6

Step 6

Create Database user for Odoo

sudo su postgres
cd
createuser -s odoo
createuser -s ubuntu_user_name
exit

Step 7

Create Odoo user and group

sudo adduser --system --home=/opt/odoo --group odoo

Step 8

Install Gdata

cd /opt/odoo
sudo wget https://pypi.python.org/packages/a8/70/bd554151443fe9e89d9a934a7891aaffc63b9cb5c7d608972919a002c03c/gdata-2.0.18.tar.gz
sudo tar zxvf gdata-2.0.18.tar.gz
sudo chown -R odoo: gdata-2.0.18
sudo -s
cd gdata-2.0.18/
python setup.py install
exit

Step 9

Odoo 11 Download from GitHub

Get lastest Odoo 11 from github repository. Download the Zip file from URL : “https://github.com/odoo/odoo/tree/11.0″ . Transfer the same file to /opt/odoo directory on server through ftp. Otherwise follow the below steps
cd /opt/odoo
sudo apt-get install git
sudo su - odoo -s /bin/bash
git clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 --single-branch
exit

Step 10

Create Odoo Log File

sudo mkdir /var/log/odoo
sudo chown -R odoo:root /var/log/odoo

Step 11

Edit Odoo configuration file

sudo vim /etc/odoo.conf
#Copy and paste below content in config file , write correct addons paths
[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = False
logfile = /var/log/odoo/odoo-server.log
addons_path = /opt/odoo/addons,/opt/odoo/odoo/addons

Save and Exit the file. Now run the below command on terminal to grant ownership.

sudo chown odoo: /etc/odoo.conf

Step 12

WKHTMLTOPDF ( Supported Version 0.12.1 ) for Odoo

sudo apt-get -f install
sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf

Step 13

Now Start Odoo Server

cd /opt/odoo/odoo
./odoo-bin

Step 14

Go to web browser to access Odoo 11

http://localhost:8069

Your Feedback will be Appreciated. Thanks

FIXES

ISSUE 1 : E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)

SOLUTION
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

Recent Posts
Showing 45 comments
  • Abulbishr
    Reply

    Good Job

    For the 13th step, i have an error with Pypdf2, i install it manual https://pypi.python.org/pypi/PyPDF2/1.25

  • Alouane
    Reply

    Hi, thanks a lot for your tutorial.

    I have not access to the git repository for entreprise , instaed i have downloaded the Packaged installer for Deb and I have get this error :

    dpkg: dependency problems prevent configuration of odoo:
    odoo depends on python3-babel; however:
    Package python3-babel is not installed.
    odoo depends on python3-dateutil; however:
    Package python3-dateutil is not installed.
    odoo depends on python3-decorator; however:
    Package python3-decorator is not installed.
    odoo depends on python3-docutils; however:
    Package python3-docutils is not installed.
    odoo depends on python3-feedparser; however:
    Package python3-feedparser is not installed.
    odoo depends on python3-gevent; however:
    Package python3-gevent is not installed.
    odoo depends on python3-html2text; however:
    Package python3-html2text is not installed.
    odoo depends on python3-jinja2; however:
    Package python3-jinja2 is not installed.
    odoo depends on python3-lxml; however:
    Package python3-lxml is not installed.
    odoo depends on python3-mako; however:
    Package python3-mako is not installed.
    odoo depends on python3-mock; however:
    Package python3-mock is not installed.
    odoo depends on python
    dpkg: error processing package odoo (–install):
    dependency problems – leaving unconfigured
    Processing triggers for systemd (229-4ubuntu19) …
    Processing triggers for ureadahead (0.100.0-19) …
    Errors were encountered while processing:

    Can you please help ?

    Thanks a lot

  • Apisak Srihamat
    Reply

    Dear Sumaiya,

    This is very helpful, many thanks for contribution.
    I have some minor suggestion, after completed step 9, we need to tell the beginer that they must do ‘exit’ :)

    • GetOpenERP
      Reply

      Thanks for the feedback. Updated

  • arik
    Reply

    sudo adduser –system –home=/opt/odoo –group odoo

    then it ask for password. What password is this.

    • GetOpenERP
      Reply

      sudo password.

  • Etienne
    Reply

    At the end of Step 9
    Missing exit

  • Jack
    Reply

    I failed to install my Odoo 11 Last time two weeks ago. Thx u for ur tutorial and help, because this is the closest step that I have ever reached.

    I run into password problems in Step 10.
    System gives me the following messages right after I issuing commands in Step 10.

    odoo@ubuntu:~$ sudo mkdir /var/log/odoo <== my command
    [sudo] password for odoo:

    After several trials, I got
    sudo: 3 incorrect password attempts

    And I have to abort the installation process. (PS: I am a new user to this ubunto+odoo system. Please forgive me if I ask a stupid question.) I wonder where it went wrong.

    • GetOpenERP
      Reply

      system is asking for login user password . If you forgot then reset it. Thanks

      • Jack
        Reply

        Thank you very much. All thanks to you. My login user password has been reset and the problem is solved. Really appreciated!
        Everything goes so well, until I practice the odoo 11 installation process on a 2nd system (they are all with the same kind of hardware equipments) just to make sure that I can repeat the process.

        It shows that the 1st machine once lived now encounter an internal server error. The following is the message:

        “The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.”

        But the 2nd machine gets her chance to be successful when I hit http://localhost:8069 in the browser. I appreciated your command since they did work. And I need your advice about my first machine. Could I use the same E-mail for two different machines. Will that be a problem?

        • Jack
          Reply

          Ha, They all come back to normal now…. Many many thanks.

  • Miguel Angel Morales Gonzalez
    Reply

    Thank you
    it was very useful to do my homework,really,!!

    By the way step 12 didn’t worked for me
    instead i did
    sudo apt-get install wkhtmltopdf
    and worked for me
    Thanks anyway

  • Dennis Del Castillo
    Reply

    Everything worked flawless, maybe in step 9 exit command should go at the end. Tested in Ubuntu 17.04. Thank you, really appreciate your effort!

    • GetOpenERP
      Reply

      Thanks for the feedback

  • Taylan
    Reply

    Thanks a lot ! works perfect !

  • Pallet Rack
    Reply

    Thank you for the guide!

    I was stuck at the start of Step 9
    cd /opt/odoo
    I got no such file or directory.
    I manually created it but it didn’t work because /opt/odoo/odoo will be missing at the end of the process.

    I followed all the steps and repeated several times but end up with the same results.

    Please help?

    • GetOpenERP
      Reply

      Kindly follow Step 7 & Step 8

  • Mojahid
    Reply

    for step 9, I face an error:

    fatal: could not create work tree dir ‘odoo': Permission denied

    solved by running:

    sudo chmod 777 /opt/odoo

  • Ashutosh Dhongde
    Reply

    Hello all,

    i done all the steps but it showing me network error when iam putting http://localhost:8069
    whta should i have to do for that.

  • Carefulrory
    Reply

    Thanks a lot!!! It works like a charm

  • Jimz
    Reply

    Thanks Sumaiya! Very consice walk-through.

    For anyone who gets a PyPDF2 related error, I forgot the exact text check that you have the Python 3 version of PyPDF2 installed:

    apt-get install python3-pypdf2

    Good luck!
    Jimz

  • Lalliantluanga Hauhnar
    Reply

    I followed all the steps but i am getting this error

    Internal Server Error
    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

    • GetOpenERP
      Reply

      Kindly share the terminal error. Or you can add us on skype. Our id is getopenerp. Thanks

    • Yunus Turmudi
      Reply

      I have same problem. When i see terminal it told me that i still use database on Odoo 9.
      And than i create a new one.
      Problem solved

      thx

  • Prad
    Reply

    Nice job

    If installing wkhtmltox gives you dependancy errors, run

    $ sudo apt-get -f install

    again

  • Son San
    Reply

    Thanks a lot! Easy to follow and works like a charm.

  • Steve Yang
    Reply

    Hi, Thank you for your guide it is great.

    However I have this error:

    @Odoo-11:/opt/odoo$ sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
    Selecting previously unselected package wkhtmltox.
    (Reading database … 105197 files and directories currently installed.)
    Preparing to unpack wkhtmltox-0.12.1_linux-trusty-amd64.deb …
    Unpacking wkhtmltox (0.12.1) …
    dpkg: dependency problems prevent configuration of wkhtmltox:
    wkhtmltox depends on fontconfig; however:
    Package fontconfig is not installed.
    wkhtmltox depends on libfontconfig1; however:
    Package libfontconfig1 is not installed.
    wkhtmltox depends on libjpeg-turbo8; however:
    Package libjpeg-turbo8 is not installed.
    wkhtmltox depends on libxrender1; however:
    Package libxrender1 is not installed.

    dpkg: error processing package wkhtmltox (–install):
    dependency problems – leaving unconfigured
    Processing triggers for man-db (2.7.5-1) …
    Errors were encountered while processing:
    wkhtmltox

    • GetOpenERP
      Reply

      Run the below command:
      sudo apt-get -f install

      Then again repeat Step 12 from 3rd command i.e sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb and so on

  • Slim
    Reply

    Very good job had it working from the first try :D

  • John
    Reply

    I’m having difficulties in step 5 adding “add a line for the repository”
    I add this line “deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main” am not sure how to save to close this list after i add this line.

    sudo vim /etc/apt/sources.list.d/pgdg.list add a line for the repository deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main wget –quiet -O – https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add – | sudo apt-key add – sudo apt-get update sudo apt-get install postgresql-9.6

    • GetOpenERP
      Reply

      add the line in file by pressing “i”. then click on Esc then type :wq! Enter. to save the content.

  • Kentino Computers
    Reply

    Work for me. Blind copy pasting is working.
    + add odo-start.sh script to /etc/init.d

  • Alireza
    Reply

    Hi, Thanks for your guide. I have this error in step 13 to start odoo server:

    root@ubuntu:/opt/odoo/odoo# ./odoo-bin
    /usr/local/lib/python3.5/dist-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use “pip install psycopg2-binary” instead. For details see: .
    “””)
    Running as user ‘root’ is a security risk.
    2018-09-04 13:27:58,955 8298 INFO ? odoo: Odoo version 11.0
    2018-09-04 13:27:58,956 8298 INFO ? odoo: addons paths: [‘/root/.local/share/Odoo/addons/11.0′, ‘/opt/odoo/odoo/odoo/addons’, ‘/opt/odoo/odoo/addons’]
    2018-09-04 13:27:58,957 8298 INFO ? odoo: database: default@default:default
    Exception in thread odoo.service.httpd:
    Traceback (most recent call last):
    File “/usr/lib/python3.5/threading.py”, line 914, in _bootstrap_inner
    self.run()
    File “/usr/lib/python3.5/threading.py”, line 862, in run
    self._target(*self._args, **self._kwargs)
    File “/opt/odoo/odoo/odoo/service/server.py”, line 251, in http_thread
    self.httpd = ThreadedWSGIServerReloadable(self.interface, self.port, app)
    File “/opt/odoo/odoo/odoo/service/server.py”, line 103, in __init__
    handler=RequestHandler)
    File “/usr/local/lib/python3.5/dist-packages/werkzeug/serving.py”, line 577, in __init__
    self.address_family), handler)
    File “/usr/lib/python3.5/socketserver.py”, line 440, in __init__
    self.server_bind()
    File “/opt/odoo/odoo/odoo/service/server.py”, line 113, in server_bind
    super(ThreadedWSGIServerReloadable, self).server_bind()
    File “/usr/lib/python3.5/http/server.py”, line 138, in server_bind
    socketserver.TCPServer.server_bind(self)
    File “/usr/lib/python3.5/socketserver.py”, line 454, in server_bind
    self.socket.bind(self.server_address)
    OSError: [Errno 98] Address already in use

    2018-09-04 13:27:59,100 8298 INFO ? odoo.addons.base.ir.ir_actions_report: Will use the Wkhtmltopdf binary at /usr/local/bin/wkhtmltopdf

    • GetOpenERP
      Reply

      Address already in use i.e port already used by any other service. Kindly kill the service by identify the pid and then restart odoo server. Kindly avoid root user.

  • Terence Faul
    Reply

    Hi I get the following

    2018-09-07 14:51:45,600 16685 INFO ? werkzeug: 192.168.1.50 – – [07/Sep/2018 14:51:45] “GET / HTTP/1.1″ 500 –
    2018-09-07 14:51:45,603 16685 ERROR ? werkzeug: Error on request:
    Traceback (most recent call last):
    File “/usr/local/lib/python3.5/dist-packages/werkzeug/serving.py”, line 270, in run_wsgi
    execute(self.server.app)
    File “/usr/local/lib/python3.5/dist-packages/werkzeug/serving.py”, line 258, in execute
    application_iter = app(environ, start_response)
    File “/opt/odoo/odoo/odoo/service/server.py”, line 250, in app
    return self.app(e, s)
    File “/opt/odoo/odoo/odoo/service/wsgi_server.py”, line 166, in application
    return application_unproxied(environ, start_response)
    File “/opt/odoo/odoo/odoo/service/wsgi_server.py”, line 154, in application_unproxied
    result = handler(environ, start_response)
    File “/opt/odoo/odoo/odoo/http.py”, line 1318, in __call__
    return self.dispatch(environ, start_response)
    File “/opt/odoo/odoo/odoo/http.py”, line 1292, in __call__
    return self.app(environ, start_wrapped)
    File “/usr/local/lib/python3.5/dist-packages/werkzeug/wsgi.py”, line 766, in __call__
    return self.app(environ, start_response)
    File “/opt/odoo/odoo/odoo/http.py”, line 1455, in dispatch
    self.setup_db(httprequest)
    File “/opt/odoo/odoo/odoo/http.py”, line 1387, in setup_db
    httprequest.session.db = db_monodb(httprequest)
    File “/opt/odoo/odoo/odoo/http.py”, line 1539, in db_monodb
    dbs = db_list(True, httprequest)
    File “/opt/odoo/odoo/odoo/http.py”, line 1506, in db_list
    dbs = odoo.service.db.list_dbs(force)
    File “/opt/odoo/odoo/odoo/service/db.py”, line 369, in list_dbs
    with closing(db.cursor()) as cr:
    File “/opt/odoo/odoo/odoo/sql_db.py”, line 634, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
    File “/opt/odoo/odoo/odoo/sql_db.py”, line 178, in __init__
    self._cnx = pool.borrow(dsn)
    File “/opt/odoo/odoo/odoo/sql_db.py”, line 517, in _locked
    return fun(self, *args, **kwargs)
    File “/opt/odoo/odoo/odoo/sql_db.py”, line 585, in borrow
    **connection_info)
    File “/usr/local/lib/python3.5/dist-packages/psycopg2/__init__.py”, line 130, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
    psycopg2.OperationalError: FATAL: role “root” does not exist

    • GetOpenERP
      Reply

      I think you accessing odoo server through root user. we recommend to exit the root user then restart the odoo server.

  • waseem
    Reply

    How can I stop this service and restart?

    • GetOpenERP
      Reply

      kill the service by identify the service pid. then restart the odoo server

  • Alberto
    Reply

    Hi,

    When I tried to run the server, had the following problem:

    Traceback (most recent call last):
    File “./odoo-bin”, line 5, in
    import odoo
    File “/opt/odoo/odoo/odoo/__init__.py”, line 84, in
    from . import modules
    File “/opt/odoo/odoo/odoo/modules/__init__.py”, line 8, in
    from . import db, graph, loading, migration, module, registry
    File “/opt/odoo/odoo/odoo/modules/graph.py”, line 10, in
    import odoo.tools as tools
    File “/opt/odoo/odoo/odoo/tools/__init__.py”, line 7, in
    from . import pdf
    File “/opt/odoo/odoo/odoo/tools/pdf.py”, line 4, in
    from PyPDF2 import PdfFileWriter, PdfFileReader
    ModuleNotFoundError: No module named ‘PyPDF2′

    \How can this be fixed?

    Thank you very much

    • GetOpenERP
      Reply

      pip3 install PyPDF2

  • Guido Palacios
    Reply

    Hilarous, i made it working on Win10 with Ubuntu 16.04 WLS !!! The only missing part was to exit the postgres user and manually start the server by typing: “sudo servive postgresql start”.

    The other thing was missing dependencies on the wkhtmltoolbox install. I fixed that by installing all manually:

    “sudo apt-get -f install libxrender1 libjpeg-turbo8 libfontconfig1 fonts-dejavu-core ttf-bitstream-vera fonts-freefont-ttf gsfonts libfontenc1 libxfont1 x11-common xfonts-encodings xfonts-utils gsfonts-x11 fontconfig-config libfontconfig1 fontconfig”

    cheers!

  • vishal kolhe
    Reply

    thanks for helping us…..

  • mohamed
    Reply

    $ ./odoo-bin
    -bash: ./odoo-bin: No such file or directory

  • Esie
    Reply

    Hi can you give step to start odoo sever automatic when system restart

  • James Taylor
    Reply

    Step 3 – I had to….

    sudo -H pip3 install Babel decorator docutils ebaysdk feedparser gevent greenlet html2text Jinja2 lxml Mako MarkupSafe mock num2words ofxparse passlib Pillow psutil psycogreen psycopg2 pydot pyparsing PyPDF2 pyserial python-dateutil python-openid pytz pyusb PyYAML qrcode reportlab requests six suds-jurko vatnumber vobject Werkzeug XlsxWriter xlwt xlrd

Leave a Reply to Apisak Srihamat Cancel reply

Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt
ONLINE HELPDESKodoo 11 Features