Read More
Menu Close

    Installing Odoo 11 on ubuntu 16.04

    Odoo version 11 is officially released now. You can find its Source Code for Community Edition from this GITHUB LINK.

    Here, in this tutorial I`ll explain how to install Odoo version 11 (Community Edition) on Ubuntu 16.04, same steps can also work for previous Ubuntu version(s) till version 14.

    If Python is already installed, make sure it is 3.5 or above that, previous versions are not compatible with Odoo 11

    Open the terminal and execute below commands step-by-step to achieve excellence:

    Step 1: 

    Update apt source-lists:

    sudo apt-get update

    Step 2: 

    Create the Odoo user that will own and run the application

    Searching for an experienced
    Odoo Company ?
    Read More
    sudo adduser --system --home=/opt/odoo --group odoo
    

    Step 3: 

    Install and configure the database server, PostgreSQL

    sudo apt-get install -y postgresql

    Once the PostgreSQL is installed, next we setup a new PostgreSQL user for our application. This user will be used for making all the database interaction form the Odoo.

    sudo service postgresql start
    
    sudo su - postgres
    
    createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo
    Enter password for new role: *****
    Enter it again:*****
    

    Finally exit from the postgres user account:

    exit

    Step 4:(Optional)

    Your Odoo server may encounter some issue(s), so I`m also mentioning few issues & their way around to fix them:

    FIX 1: You need to upgrade ”wkhtmltopdf” to 0.12.1  You can also check this LINK

    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/wkhtmltopdf /usr/bin
    sudo cp /usr/local/bin/wkhtmltoimage /usr/bin

    FIX 2: Check if your PostgreSQL have proper encoding(UTF-8) or not, used in Odoo Application, if not you can do like this:

    sudo su - postgres
    
    psql
    
    update pg_database set encoding = pg_char_to_encoding('UTF8');
    
    \q
    exit

    FIX 3: Set The Locale To UTF-8 For Python 3, if you are getting UnicodeEncodeError /UnicodeDecodeError, you can fix it,as: You can also check this LINK

    Directly execute these commands:

    locale-gen en_US.UTF-8
    
    export LANG=en_US.UTF-8 LANGUAGE=en_US.en LC_ALL=en_US.UTF-8

    FIX 4: In postgreSQL, allow TCP connection, if you are getting error like:

    psycopg2.OperationalError: FATAL: Peer authentication failed for user

    To fix it,in /etc/postgresql/9.5/main/pg_hba.conf change peer to md5:

    # "local" is for Unix domain socket connections only
    local     all     all     peer md5
    

    then

    sudo service postgresql restart

    Step 5: 

    Install the necessary Python libraries & other needed libraries needed for the application:

    Odoo 11 will use python 3.5(which is pre-installed on our Ubuntu), previously it uses python 2.7, so in order to install all dependent libraries easily we`ll install pip3 in our server, as:

    sudo apt-get install -y python3-pip

    Once pip3 is installed on your server, we can proceed with installing other dependent libraries using pip3 as:

    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 Pypdf2

    Next is to install 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 -y node-less

    Once all the packages are installed we are ready to proceed with installing Odoo server.

    Step 6:

    Installing ODOO version 11 Community Edition hosted on GITHUB.

    Make sure you have GIT installed on your system and if not then install with the simple command:

    sudo apt-get install -y git

    Switch to the Odoo user:

    sudo su - odoo -s /bin/bash

    Clone the latest branch of Odoo, in our case it is 11.0 from Github:

    git clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 --single-branch

    (This might take a little while depending on the speed of your Internet connection.)

    Finally exit from the odoo user account:

    exit

    Step 7:

    Next step is to create a configuration file for Odoo. But before doing so w`ll first create the directory for storing logs of Odoo server and assigning proper ownership to the directory:

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

    Next is to create the configuration file for odoo server. Odoo application will use these configuration to run so fill in the configuration as per your requirements.

    sudo nano /etc/odoo-server.conf

    A sample configuration file will look like this:

    [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

    (* You need to use the same password you used back in step 3.)

    Once the configuration file is created we will set the ownership rights

    sudo chown odoo: /etc/odoo-server.conf
    sudo chmod 640 /etc/odoo-server.conf

    Step 8:

    Installing the boot script

    For the final step we need to install a script which will be used to start-up & shut-down the Odoo server automatically, with the correct user. Here is a Link, you can use this script for the same purpose, as:

    sudo nano /etc/init.d/odoo-server

    Paste the same contents of this script to this file. Once it is in the right place you will need to make it executable and owned by root:

    sudo chmod 755 /etc/init.d/odoo-server
    
    sudo chown root: /etc/init.d/odoo-server
     

    Step 9:

    Testing the server

    To start the Odoo server type:

    sudo /etc/init.d/odoo-server start

    You should now be able to view the log-file as:

    tailf /var/log/odoo/odoo-server.log

    If there are any problems in this step you need to go back and check, feel free to comment on this blog i`ll try my best to help you 🙂

    [OPTIONAL] Also, in order to debug, you can start the server manually just to check if it actually runs well or not, as:

    sudo su – odoo -s /bin/bash

    /opt/odoo/odoo-bin

    If the log file looks OK, you can check Odoo server running on your browser with url:

    http://localhost:8069
    

    BOOT SCRIPT USAGE:

    /etc/init.d/odoo-server {start|stop|restart/reload|status|force-restart|force-stop}

    TIPS:

    • Using ‘status’, we can find information of all runnning odoo daemon servers.
    • Using ‘force-stop/force-restart’, we can kill all running odoo daemon forcefully, and can start fresh odoo-server daemon.
    • start/stop will not allow more than one process per daemon.

    That`s it…
    Thanks for reading this blog !!! I hope it will help someone.

    Your opinions, comments and suggestions are important to keep this extension updated and more usefull !!!

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    81 comments

  • Ali
    can we run above in ubuntu 18.04 ?
    • Mohit Chandra (Moderator)
      yes you can try it, it should run.
      Thanks
  • Rubab
    Hi, thank you for sharing this tutorial.. Can you please answer my query as well? will be highly obliged.. So i followed the tutorial step by step while setting odoo up on a ubuntu AWS EC2 instance. At step 9, when I run sudo /etc/init.d/odoo-server start it gives me this error:
    Error in ODOO Daemon file: /opt/odoo/odoo-inventory/odoo-11.0/odoo-bin
    Possible error(s):
    * Daemon File doesn’t exists.
    * Daemon File is not set to executable.

    do we need to make any changes to this odoo-bin file? I just provided its path to the odoo-server file.. Many thanks.

    • Manish Bisht
      The variable “DAEMON” represents the executable file of Odoo which will run Odoo service.

      Please check if you can locate the file “/opt/odoo/odoo-inventory/odoo-11.0/odoo-bin” in your system.

      If the file is there, then you must make it executable. If the file is not available then give the correct file “odoo-bin” file.

      Use command to make file executable :- chmod +x /opt/odoo/odoo-inventory/odoo-11.0/odoo-bin

  • Rubab Fatima
    Hi, After completing setup, when I try starting the server, it gives following error:
    Error in ODOO Daemon file: /opt/odoo/odoo-inventory/odoo-11.0/odoo-bin
    Possible error(s):
    * Daemon File doesn’t exists.
    * Daemon File is not set to executable.
    If i directly run /opt/odoo/odoo-inventory/odoo-11.0/odoo-bin, it gives this error:
    -bash: /opt/odoo/odoo-inventory/odoo-11.0/odoo-bin: Permission denied

    If I try running it via this command (that I used to use while running on Windows) python3 odoo-bin -w odoo -r odoo –addons-path=addons,custom_addons –log-level debug_rpc
    It shows the service as running now, but still it is not accessible at the IP:8069

    2019-05-02 05:42:50,927 15941 DEBUG ? odoo.netsvc: logger level set: “odoo.http.rpc.request:INFO”
    2019-05-02 05:42:50,928 15941 DEBUG ? odoo.netsvc: logger level set: “odoo.http.rpc.response:INFO”
    2019-05-02 05:42:50,928 15941 DEBUG ? odoo.netsvc: logger level set: “:INFO”
    2019-05-02 05:42:50,928 15941 DEBUG ? odoo.netsvc: logger level set: “odoo:DEBUG”
    2019-05-02 05:42:50,928 15941 DEBUG ? odoo.netsvc: logger level set: “odoo.sql_db:INFO”
    2019-05-02 05:42:50,928 15941 DEBUG ? odoo.netsvc: logger level set: “odoo.http.rpc.request:DEBUG”
    2019-05-02 05:42:50,928 15941 DEBUG ? odoo.netsvc: logger level set: “:INFO”
    2019-05-02 05:42:50,928 15941 INFO ? odoo: Odoo version 11.0
    2019-05-02 05:42:50,928 15941 INFO ? odoo: addons paths: [‘/home/ubuntu/.local/share/Odoo/addons/11.0’, ‘/opt/odoo/odoo-inventory/odoo-11.0/addons’, ‘/opt/odoo/odoo-inventory/odoo-11.0/custom_addons’, ‘/opt/odoo/odoo-inventory/odoo-11.0/odoo/addons’]
    2019-05-02 05:42:50,928 15941 INFO ? odoo: database: [email protected]:default
    2019-05-02 05:42:50,951 15941 DEBUG ? odoo.service.server: Setting signal handlers
    2019-05-02 05:42:50,952 15941 INFO ? odoo.service.server: HTTP service (werkzeug) running on 0.0.0.0:8069
    2019-05-02 05:42:50,954 15941 DEBUG ? odoo.service.server: cron0 started!
    2019-05-02 05:42:50,954 15941 DEBUG ? odoo.service.server: cron1 started!
    2019-05-02 05:42:51,189 15941 INFO ? odoo.addons.base.ir.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
    2019-05-02 05:42:51,303 15941 DEBUG ? odoo.tools.translate: translation went wrong for “‘Selecting the “Warning” option will notify user with the message, Selecting “Blocking Message” will throw an exception with the message and block the flow. The Message has to be written in the next field.'”, skipped

    Please help.. I used this repository on windows, could it be that we need different repo for ubuntu setup?? Your help will be highly appreciated.

    • Manish Bisht
      Hi,

      Please check your setup again & “odoo-inventory” folder hasn’t been used in the article. And make sure to set the permissions properly.
      Repo is same for both Windows & Linux.

      Thanks

  • Ravi Kumar
    How to setup odoo 11 without the demo data?
    • Mohit Chandra (Moderator)
      While creating database don`t choose demo data option that`s it.
      thanks
  • Nitesh Chulani
    Hi there,
    Thanks for your detailed step–by-step guide. It really helped me alot and my odoo is working perfectly fine but i would like to make it secure by adding Le’s Encrypt SSL, How to do that? do you have any post on it?
  • Kevin Hinojosa
    i had the same problems with the status of the server showing stoped. I could get odoo server up, changing the step 5 of this tutorial instead of pip3 , i use pip 3.5. Like this: pip3.5 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 . Then i force-stop the server and start it again and i could get up and running
    • Mohit Chandra
      Hi Kevin,
      yes, you are correct if you have more than 1 variant of python 3.x installed on your system, in such case you must choose the correct one, i.e All python libraries must be installed under python 3.5 for ODOO 11

      By default, pip2 points to python2.x & pip3 points to python3.x
      It depends on your system which pip points to which python.
      You can check it like this way :
      pip3 -V
      or
      pip3.5 -V

      Thanks
      Mohit

  • Manavendra Doss
    Hi Thanks you for valuable tutorial
    Successfully installed odoo11 on ubuntu16 vps server
    odoo server running
    but i get error on browser messed up
    https://uploads.disquscdn.com/images/7826d1d7f3f8ad0d8a811d415aef1c866eb0c1fca5ba8feeacee5e82ce526335.png

    Database creation error: relation “ir_model” does not exist LINE 1: SELECT * FROM ir_model WHERE state=’manual’ ^
    https://uploads.disquscdn.com/images/049e0adcc6f2d730b695b568931f95e0313ee09481953b31f4945098e64d138d.png

    • Mohit Chandra
      Hi,
      You need to upgrade your postgresql version.
      As, Odoo will not work with postgres <= 9.4 because Odoo uses the "ON CONFLICT" clause that was added in postgres 9.5.
  • Manavendra Doss
    hi thanks to your valuable tutorial for odoo 11 on ubuntu 16
    Successfully installed odoo 11 with your steps
    But i getting error on browser
    also i got error in browser –
    https://uploads.disquscdn.com/images/049e0adcc6f2d730b695b568931f95e0313ee09481953b31f4945098e64d138d.png
    Database creation error: relation “ir_model” does not exist LINE 1: SELECT * FROM ir_model WHERE state=’manual’ ^
    https://uploads.disquscdn.com/images/7826d1d7f3f8ad0d8a811d415aef1c866eb0c1fca5ba8feeacee5e82ce526335.png
    • Mohit Chandra (Moderator)
      Hi,
      You need to upgrade your postgresql version.
      As, Odoo will not work with postgres <= 9.4 because Odoo uses the "ON CONFLICT" clause that was added in postgres 9.5.
      • krish
        Hi Mohit,
        We are getting the similar Error & postgres version is 9.6, any suggestion to fix will be helpful.
        • Mohit Chandra (Moderator)
          Hi Krish,

          This error occurs only when odoo with postgres <= 9.4. So, if you have multiple postgres installed on your server make sure odoo is using postgres 9.6 only

          Also, if you can share screenshot of your exact error i can help you in more better way.
          Thanks

          • Mariagrazia
            Hi, what if I already have postgresql version 11?
          • Manish Bisht
            Hi Mariagrazia,

            Postgresql v9.6 is suggested for Odoo 11. If you have already Postgresql 11 installed,then you may downgrade it to 9.6 or you may just install 9.6 in parallel to existing Postgres 11.
            Postgersql 11 may cause some issues as it is major version upgrade.
            Make sure to configure the unique Postgresql port in case you have two Postgresql version running in parallel.

            Thanks,

  • Deb Yoj
    what should I do, whenever I Install Babel,
    Why I can’t install Babel?
    It shows:

    Could not find a version that satisfies the requirement Babel(from versions: )
    No matching distribution for Babel

    • Mohit Chandra
      First, upgrade your pip :
      sudo pip3 install –upgrade pip

      then try:
      sudo pip3 install Babel

      Alternatively, you can also install it by:
      sudo apt-get install python-babel

      Thanks
      Mohit

  • Deb Yoj
    I already installed babel but it still shows an ImportError: No module named ‘babel’
    I’m on the last step already, pls help, thanks in advance.

    https://uploads.disquscdn.com/images/7f608618a3de82c12f968616fb897653d7f98a0587e153e3f65a8a2b53e6b4bf.png

    • Mohit Chandra
      Hi,
      For odoo 11, you need to install babel as a package for python 3.5, try to install it with command :
      pip3 install babel

      Thanks

      • Deb Yoj
        Hello, it shows requirement already satisfied, but still if I do last step which is
        sudo su – odoo -s /bin/bash

        /opt/odoo/odoo-bin

        same output 🙁
        Sorry it’s my first time installing

        • Mohit Chandra
          Can you tell me the first line written in “/opt/odoo/odoo-bin” file ?
          is it -> #!/usr/bin/env python3
          Please confirm..
  • Deyvson Aguiar
    How to resolve:

    2017-12-28 15:11:58,255 566 INFO ? odoo.sql_db: Connection to the database failed
    2017-12-28 15:11:58,257 566 INFO ? werkzeug: 200.219.108.147 – – [28/Dec/2017 15:11:58] “GET /favicon.ico HTTP/1.1” 500 –
    2017-12-28 15:11:58,262 566 ERROR ? werkzeug: Error on request:
    Traceback (most recent call last):
    File “/usr/local/lib/python3.4/dist-packages/werkzeug/serving.py”, line 267, in run_wsgi
    execute(self.server.app)
    File “/usr/local/lib/python3.4/dist-packages/werkzeug/serving.py”, line 255, in execute
    application_iter = app(environ, start_response)
    File “/opt/odoo/odoo/service/server.py”, line 252, in app
    return self.app(e, s)
    File “/opt/odoo/odoo/service/wsgi_server.py”, line 166, in application
    return application_unproxied(environ, start_response)
    File “/opt/odoo/odoo/service/wsgi_server.py”, line 154, in application_unproxied
    result = handler(environ, start_response)
    File “/opt/odoo/odoo/http.py”, line 1298, in __call__
    return self.dispatch(environ, start_response)
    File “/opt/odoo/odoo/http.py”, line 1272, in __call__
    return self.app(environ, start_wrapped)
    File “/usr/local/lib/python3.4/dist-packages/werkzeug/wsgi.py”, line 609, in __call__
    return self.app(environ, start_response)
    File “/opt/odoo/odoo/http.py”, line 1427, in dispatch
    self.setup_db(httprequest)
    File “/opt/odoo/odoo/http.py”, line 1359, in setup_db
    httprequest.session.db = db_monodb(httprequest)
    File “/opt/odoo/odoo/http.py”, line 1510, in db_monodb
    dbs = db_list(True, httprequest)
    File “/opt/odoo/odoo/http.py”, line 1478, in db_list
    dbs = odoo.service.db.list_dbs(force)
    File “/opt/odoo/odoo/service/db.py”, line 362, in list_dbs
    with closing(db.cursor()) as cr:
    File “/opt/odoo/odoo/sql_db.py”, line 634, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
    File “/opt/odoo/odoo/sql_db.py”, line 178, in __init__
    self._cnx = pool.borrow(dsn)
    File “/opt/odoo/odoo/sql_db.py”, line 517, in _locked
    return fun(self, *args, **kwargs)
    File “/opt/odoo/odoo/sql_db.py”, line 585, in borrow
    **connection_info)
    File “/usr/local/lib/python3.4/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

    My postgres is 9.3:

    postgres=# du
    List of roles
    Role name | Attributes | Member of
    ———–+————————————————+———–
    odoo | Create role, Create DB, Replication | {}
    postgres | Superuser, Create role, Create DB, Replication | {}

    • Mohit Chandra
      Hi,
      It seems that you have not configured odoo configuration file correctly or not using it while running odoo, check sample configuration file in step 7.
      If you’re trying to run odoo manually on the command line then switch to the odoo user first (running as root is a bad idea), and use that configuration file as well as the argument of the command.

      Thanks

  • Qamar Yaqub
    Hi,
    i get below sudo /etc/init.d/odoo-server start; what i have done wrong?

    /etc/init.d/odoo-server: 1: /etc/init.d/odoo-server: [options]: not found
    /etc/init.d/odoo-server: 2: /etc/init.d/odoo-server: Syntax error: “;” unexpected

    [options]
    ; This is the password that allows database operations:
    ; admin_passwd = admin
    db_host = localhost
    db_port = 5432
    db_user = odoo
    db_password = uadmin
    logfile=/var/log/odoo/odoo-server.log
    addons_path=/opt/odoo/addons,/opt/odoo/odoo/addons

    • Mohit Chandra
      Hi,
      Please make sure you have set correct permission to the script file, i.e

      sudo chmod 755 /etc/init.d/odoo-server

      sudo chown root: /etc/init.d/odoo-server

      Thanks

  • ranjith ravindran
    hi , I have installed this all successfully. when i start the server, it gives no error,but the status its showing stoped.
    The probelem what i have found is :

    cannot import name ‘dump_options_header’

    No module named ‘urllib2

    cannot import name ‘parse_http_list’

    please tell me how to download and install this modules.

    • Mohit Chandra
      Hi,
      urllib2 is a python-2.7 library, it seems that you are using some additional(third-party) modules of odoo 10 version. Is it ?
      If it so, remove them and then try.
      Thanks
      Mohit
      • ranjith ravindran
        yes, thats true…can you please teach me how to remove it ? sorry for my lack of knowledge as i am beginner in this field.
        • Mohit Chandra
          Hi,
          Just move all modules of odoo version 10 to some other folder, placed on your odoo 11 addons path(addons path can be found from configuration file.)
          Thanks
          • ranjith ravindran
            i really failed to make it run…..is there any cmd to remove this files through terminal?

            I am not using oodo 10 now.

          • Mohit Chandra
            Hi,
            In order to debug, you can start the server just to check if it actually runs, as:

            sudo su – odoo -s /bin/bash

            /opt/odoo/odoo-bin

            Check the output, you`ll get the exact error here, try to fix it, if not able let me know the output here. i`ll try my best to help you.

            Simply enter CTL+C to stop the server and then exit to leave the odoo user account.

            Apart from that, if you need our Technical support(PAID), you can create a ticket here https://webkul.uvdesk.com/en/customer/create-ticket.

            Thanks

  • Jose
    Hi Odoo experts,

    I am having trouble in step 5 while installing odoo dependencies. I have installed npm 5.5.1 and also have nvm 0.33.6 in my system. when I run: sudo npm install -g less less-plugin-clean-css

    https://uploads.disquscdn.com/images/97c12297b4f1ccef9853c00cd46e0325e6d5dd6688ebec7e47fbf23ce3859f3a.png Error messages comes: Unable to execute /usr/bin/npm: no such file or directory.

    I check my npm installation using command “which npm” it gives “/root/.nvm/versions/node/v8.9.1/bin/npm”.
    Also, i have less-plugin-clean-css installed which resides in node_modules in /usr/bin/node_modules.
    and lessc in same directory as npm ie. /root/.nvm/versions/node/v8.9.1/bin/lessc (Found using which lessc)

    Can you guys help me to link these packages to odoo. I think my system got everything but scattered somewhere which need linking.

    I am new to Ubuntu environment. Please help. I cannot go beyond this step.

    Thank you in advance.

    • Mohit Chandra
      Hi,
      It appears that you’ve install node via nvm, and nodejs was not in the $PATH variable and therefore couldn’t be found. You need to setup an alias for it, i hope it will work then

      1) To verify that nvm has been successfully installed or not, hit command:
      command -v nvm
      – It should output like: nvm

      2) To check the current version of node, hit command:
      nvm current
      – It should output like: v8.9.1 in your case.

      3) In any new shell, you’ll need to tell nvm which version to use:
      nvm use 8.9.1
      – It should output like: Now using node v8.9.1 (npm v5.5.1) in your case

      4) To set a default Node.js version to be used in any new shell, use the alias default:
      nvm alias default node
      – It should output like: default -> node (-> v8.9.1)

      One more thing, in your case you don`t need to put ‘sudo’ in command – “sudo npm install -g less less-plugin-clean-css” 🙂

      If all steps outputs good, you can proceed with next steps and check if odoo runs properly or not. I hope it will work.
      Thanks

      • Jose
        Hi
        Thank you for your instant reply. I did installation successfully but when i test odoo in browser. some error came up (style compilation error):

        Can you please help to figure out why this error is showing up.
        I have less installed in system. I can find it using command “which lessc” which gives me “/root/.nvm/versions/node/v8.9.1/bin/lessc”

        Thank you in advance.

        Browser error:

        The style compilation failed, see the error below. Your recent actions may be the cause, please try reverting the changes you made.
        (b”, b’/usr/bin/env: ânodeâ: Permission denied
        ‘)This error occured while compiling the bundle ‘web.assets_common’ containing:
        – /web/static/lib/bootstrap/less/variables.less
        – /web/static/lib/bootstrap/less/mixins/vendor-prefixes.less
        – /web/static/lib/bootstrap/less/mixins/buttons.less
        – /web/static/lib/bootstrap/less/mixins/clearfix.less
        – /web/static/lib/bootstrap/less/mixins/size.less
        – /web/static/src/less/variables.less
        – /web/static/src/less/utils.less
        – /web_editor/static/src/less/web_editor.variables.less
        – /web/static/lib/bootstrap-datetimepicker/src/less/_bootstrap-datetimepicker.less
        – /web/static/src/less/fonts.less
        – /web/static/src/less/navbar.less
        – /web/static/src/less/mimetypes.less
        – /web/static/src/less/modal.less
        – /web/static/src/less/animation.less
        – /web/static/src/less/rainbow.less
        – /web/static/src/less/datepicker.less
        – /web_planner/static/src/less/web_planner_common.less
        – /web_tour/static/src/less/tip.less
        – /web_tour/static/src/less/keyframes.less

        • Mohit Chandra
          Hi,
          Check the output of command : “which node”
          if no output, then check the output of command : “which nodejs”

          If you get back a binary path, then take this output, and run the following command:
          “sudo ln -s /usr/bin/node”

          Then delete old database and try with new database on odoo, [OR] re-compile all assets.
          I hope it will work.

          Also,in order to make sure your lessc is accessible via Odoo user, you can hit command

          sudo su – odoo -s /bin/bash
          lessc -v

          Thanks

          • Ghulam Murtaza
            [email protected]:~$ sudo /etc/init.d/odoo-server start
            Error in ODOO Daemon file: /opt/odoo/odoo-bin
            Possible error(s):
            * Daemon File doesn’t exists.
            * Daemon File is not set to executable.
            Eror showing when excute server start command in terminal please help me
  • sumit
    “tailf /var/log/odoo/odoo-server.log”
    Put this command show the Error -: tailf: stat of /var/log/odoo/odoo-server.log failed: No such file or directory
    can you please help me out
    • Mohit Chandra
      it means that this file doesn`t exists may be it`s not created yet. Please re-check odoo server is running or not by hitting this command :
      /etc/init.d/odoo-server status
      • sumit
        /etc/init.d/odoo-server start
        /etc/init.d/odoo-server status
        show status -: STOPPED
        • Mohit Chandra
          In order to debug, you can start the server just to check if it actually runs, as:

          sudo su – odoo -s /bin/bash

          /opt/odoo/odoo-bin

          If there are errors, you’ll need to debug(might be some external libraries are missing) and find out where the problem is.

          Otherwise simply enter CTL+C to stop the server and then exit to leave the odoo user account.

          Thanks

  • Eduardo
    Hi, thanks for your post. Everithing has run perfect however when I boot the server Odoo nothing happend and I can see this in syslog:

    Nov 22 10:48:42 servidorbb systemd[1]: odoo-server.service: Control process exited, code=exited status=1
    Nov 22 10:48:42 servidorbb systemd[1]: Failed to start LSB: Using this script, we can start/stop/restart or check status of odoo server..
    Nov 22 10:48:42 servidorbb systemd[1]: odoo-server.service: Unit entered failed state.
    Nov 22 10:48:42 servidorbb systemd[1]: odoo-server.service: Failed with result ‘exit-code’.
    Any advise. thank you.

    • Mohit Chandra
      Can you try to run odoo manually via script as given in step 9, and let me know the result ?
      • Eduardo
        Thanks, when I run it manually runs perfect. It is not running when I boot the system.
        • Mohit Chandra
          HI,
          From your error it seems that there is some problem while running the script(odoo-server) by the system on boot. Plz confirm few points so that i can help you in more better way:

          1) Output of this command : sudo update-rc.d odoo-server defaults
          – It should be like this – “insserv: script odoo-server: service odoo-server already provided!”

          2) Did you change anything in the script ?

          3) Goto /etc/init.d directory, and run this command : grep “Provides:” * | grep -i odoo-server
          – It will list all the files that provide the odoo-server service.
          – there must be 1 result only, if not let me know

          Thanks.

          • Eduardo
            Hi,

            I reboot the server and this is the sequence of commands:

            [email protected]:~$ sudo /etc/init.d/odoo-server start
            [sudo] password for adminbb:
            Starting ODOO-SERVER

            [ OK ] [email protected]:~$ sudo update-rc.d odoo-server defaults
            [email protected]:~$ cd /etc/init.d
            [email protected]:/etc/init.d$ grep “Provides:” * | grep -i odoo-server
            odoo-server:# Provides: odoo-server
            [email protected]:/etc/init.d$

            So the answer of your questions:
            1. no answer
            2. No, I didn’t change anyting.
            3. the answer: odoo-server:# Provides: odoo-server

            Thanks.

          • Mohit Chandra
            Hi,
            If this boot script is not working, try this one :

            1) Create a new file at “/lib/systemd/system/odoo-server.service” and paste the content of :
            https://raw.githubusercontent.com/mohitg1213/odoo_scripts/master/odoo11

            2) Change File Ownership and Permissions
            sudo chmod 755 /lib/systemd/system/odoo-server.service
            sudo chown root: /lib/systemd/system/odoo-server.service

            3) Test the Server
            – To Start:
            sudo systemctl start odoo-server
            – To Stop:
            sudo systemctl start odoo-server
            – To check status :
            sudo systemctl status odoo-server

            4) To automatically Odoo startup on server boots:
            sudo systemctl enable odoo-server

            I`ll soon update my blog as well, please confirm if it`s works.
            Thanks

  • Aleli Sanchez Mendez
    Thank you very much. This Post was be useful for me
    • Webkul Support
      Thanks for your valuable feedback.
      Your feedbacks, opinions and comments are very important to us as it helps us to improve our service any way we can, and we appreciate your taking the time to provide feedback to our module.
  • มนต์ชัย พงศ์พฤฒิพันธ์
    Step 4 that works for me is like this:

    sudo su – postgres

    psql
    update pg_database set encoding = pg_char_to_encoding(‘UTF8’);
    q

    exit

    • Mohit Chandra
      Thanks for your feedback, I updated the blog now !
  • Chase
    I am not sure what I am doing wrong, but after following the steps to a T, I am not able to get Odoo started. It takes the start command then, when I check the status I get “STOPPED”. Any help would be appreciated!

    [email protected]:~$ sudo /etc/init.d/odoo-server start

    Starting ODOO-SERVER

    [ OK ] [email protected]:~$ sudo /etc/init.d/odoo-server status

    Current Status of ODOO-SERVER:

    * STOPPED

    • Mathew Twardowski
      I had the same issue. I removed the odoo directory created in step 5 and re-cloned it. Seemed to work for me. I did not follow this guide all the way through and tried to install odoo using odoo’s installation instructions, then realized several dependencies cannot be resolved (such as python3-vobject or python3-pyldap).
      • Chase
        Thanks for the feedback, however I am unsure how I am suppose to fix the problem. Can you give me a little more info as to what I need to do please.
        • Mathew Twardowski
          Can’t remember for sure, but I think I just ran:
          sudo rm -R /opt/odoo

          and then:
          sudo su – odoo -s /bin/bash
          git clone https://www.github.com/odoo/odoo –depth 1 –branch 11.0 –single-branch .

          However, your issue and results may differ.

          • Mohit Chandra
            You need to do fix ‘locale’ things before cloning odoo on your server. Now, I changed the sequence for Odoo Installation in this blog. I hope such issue will not arise again to anyone 🙂
        • Philippe Champigny
          I think you might wanna try to install the requirements for the odoo user.

          sudo su – odoo -s /bin/bash

          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

          exit

          sudo /etc/init.d/odoo-server start
          sudo /etc/init.d/odoo-server status

          • Chase
            🙂 Its up and running, thank you!
          • Philippe Champigny
            You’re welcome! 🙂
          • Aleli Sanchez Mendez
            That solves the problem for me
  • Eduardo Capote
    when trying to execute odoo it says:

    [email protected]****:~$ sudo /etc/init.d/odoo-server start
    Error in ODOO Daemon file: /opt/odoo/server/odoo-bin
    Possible error(s):
    * Daemon File doesn’t exists.
    * Daemon File is not set to executable.

    • Mohit Chandra
      Hi @eduardo_capote:disqus ,
      From the error it seems that file ‘odoo-bin’ doen`t exists on path /opt/odoo/server.
      – Make sure file exists or not , /opt/odoo/server/odoo-bin
      – If exists, make it executable by hitting command :

      sudo chmod 755 /etc/init.d/odoo-server
      sudo chown root: /etc/init.d/odoo-server

      I guess while cloning from git you missed ‘.’ at the end, & the result cloning is done under new odoo directory, i.e file exits on path /opt/odoo/odoo/server/odoo-bin in place of /opt/odoo/server/odoo-bin

      Please check and confirm.

      • Petrica Milea
        Hi, I have the same problem. I missed ‘ . ‘ while cloning from git. What can I do now?
        the Server folder is missing as well
  • Mathew Twardowski
    In Step 10 i get the following error. I don’t see these parameters defined at all in the odoo-server script file.

    $ sudo update-rc.d odoo-server defaults
    insserv: Script odoo-server is broken: incomplete LSB comment.
    insserv: missing `Provides:’ entry: please add.
    insserv: missing `Required-Start:’ entry: please add even if empty.
    insserv: missing `Required-Stop:’ entry: please add even if empty.
    insserv: missing `Default-Start:’ entry: please add even if empty.
    insserv: missing `Default-Stop:’ entry: please add even if empty.
    insserv: Default-Start undefined, assuming empty start runlevel(s) for script `odoo-server’
    insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `odoo-server’

    • Mohit Chandra
      Hi @mathewtwardowski:disqus

      Thanks for notifying us this issue, I have updated the script accordingly, please try now. I hope it`ll work fine now.

      Thanks

      • Mathew Twardowski
        Thanks for the update. The sudo update-rc.d odoo-server defaults command works now, but when I restart the server, I still have to manually start /etc/init.d/odoo-server

        Found some relevant log entries:
        /var/log/syslog:Oct 10 16:45:31 MyMachine systemd[1]: odoo-server.service: Control process exited, code=exited status=1
        /var/log/syslog:Oct 10 16:45:31 MyMachine systemd[1]: odoo-server.service: Unit entered failed state.
        /var/log/syslog:Oct 10 16:45:31 MyMachine systemd[1]: odoo-server.service: Failed with result ‘exit-code’.

        • Mohit Chandra
          Hi,
          If this boot script is not working, try this one :

          1) Create a new file at “/lib/systemd/system/odoo-server.service” and paste the content:
          https://raw.githubusercontent.com/mohitg1213/odoo_scripts/master/odoo11

          2) Change File Ownership and Permissions
          sudo chmod 755 /lib/systemd/system/odoo-server.service
          sudo chown root: /lib/systemd/system/odoo-server.service

          3) Test the Server
          – To Start:
          sudo systemctl start odoo-server
          – To Stop:
          sudo systemctl start odoo-server
          – To check status :
          sudo systemctl status odoo-server

          4) To automatically Odoo startup on server boots:
          sudo systemctl enable odoo-server

          I`ll soon update my blog as well, please confirm if it`s works.
          Thanks

  • Abdullah Fahad
    This didn’t work in the end when i try to start the odoo the server crashes

    Odoo-bin crashed
    with ImportError in /opt/odoo/odoo/tools/pdf.py: No module named
    `PyPDF2`

    also can’t login to postgres in step Fix2

    • Mohit Chandra
      Hi,
      From the error it seems that all Python Libraries are not installed properly, please make sure you have performed step 5, and it finishes without any error(s).

      and can you paste the error message when you try to login via postgres user, i`ll try to help you then
      Thanks

  • Jack Hao
    Great steps installing Odoo 11. After odoo installation in Step 5, we will need run:

    “pip3 install -r requirements.txt” login as odoo inside /opt/odoo directory.

    • Mohit Chandra
      Hi Jack,
      Thanks for your feedback.

      Regarding your suggestion, I have did the same in step 5,
      difference is – in requirements.txt we need to install specific version of python libraries, but i suggested/tested with all latest version of python libraries , and its working well !

  • Back to Top

    Table of Content