Yenthe666 / InstallScript

Odoo install script
MIT License
1.23k stars 1.55k forks source link

Error when installing odoo V16 on fresh DigitalOcean Droplet - Ubuntu 20.04 #370

Open timcouchoud opened 2 years ago

timcouchoud commented 2 years ago

Hi,

I get errors when installing odoo with the script on Ubuntu 20.04 (fresh server on Digital Ocean). odoo-server service shows "active (exited)"

Thanks

● odoo-server.service - LSB: Enterprise Business Applications Loaded: loaded (/etc/init.d/odoo-server; generated) Active: active (exited) since Sat 2022-10-22 07:02:11 UTC; 14s ago Docs: man:systemd-sysv-generator(8) Process: 6449 ExecStart=/etc/init.d/odoo-server start (code=exited, status=0/SUCCESS)


ERROR by installing

Building wheels for collected packages: psycopg2 Building wheel for psycopg2 (setup.py) ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x_cfpeb0/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-x_cfpeb0/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-wwwcv9y7 cwd: /tmp/pip-install-x_cfpeb0/psycopg2/ Complete output (40 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/psycopg2 copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/errors.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/init.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_lru_cache.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/compat.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2 running build_ext building 'psycopg2._psycopg' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/psycopg x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.8.6 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=140005 -DHAVE_LO64=1 -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/14/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement In file included from psycopg/psycopgmodule.c:28: ./psycopg/psycopg.h:36:10: fatal error: libpq-fe.h: No such file or directory 36 | #include | ^~~~ compilation terminated.

It appears you are missing some prerequisite to build the package from source.

You may install a binary package by installing 'psycopg2-binary' from PyPI. If you want to install psycopg2 from source, please install the packages required for the build and try again.

For further information please check the 'doc/src/install.rst' file (also at https://www.psycopg.org/docs/install.html).

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for psycopg2 Running setup.py clean for psycopg2 Failed to build psycopg2 Installing collected packages: psycopg2, pydot, PyPDF2, python-ldap, python-stdnum, pyusb, qrcode, reportlab, vobject, Werkzeug, xlrd, XlsxWriter, xlwt, defusedxml, appdirs, cached-property, isodate, zeep Running setup.py install for psycopg2 ... error ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x_cfpeb0/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-x_cfpeb0/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-5rm1jtfy/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/psycopg2 cwd: /tmp/pip-install-x_cfpeb0/psycopg2/ Complete output (40 lines): running install running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/psycopg2 copying lib/errorcodes.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/errors.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/extensions.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/init.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_lru_cache.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/tz.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_range.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/compat.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_ipaddress.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/pool.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/extras.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/_json.py -> build/lib.linux-x86_64-3.8/psycopg2 copying lib/sql.py -> build/lib.linux-x86_64-3.8/psycopg2 running build_ext building 'psycopg2._psycopg' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/psycopg x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSYCOPG_VERSION=2.8.6 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=140005 -DHAVE_LO64=1 -I/usr/include/python3.8 -I. -I/usr/include/postgresql -I/usr/include/postgresql/14/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-3.8/psycopg/psycopgmodule.o -Wdeclaration-after-statement In file included from psycopg/psycopgmodule.c:28: ./psycopg/psycopg.h:36:10: fatal error: libpq-fe.h: No such file or directory 36 | #include | ^~~~ compilation terminated.

It appears you are missing some prerequisite to build the package from source.

You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.

For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-x_cfpeb0/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-x_cfpeb0/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-5rm1jtfy/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/psycopg2 Check the logs for full command output.

anddev1717 commented 2 years ago

Install libpq-dev before installing V16 requirements.txt e.g. apt-get install libpq-dev I guess updating the install script https://github.com/Yenthe666/InstallScript/blob/16.0/odoo_install.sh line 91 to include libpq-dev is needed .

Yenthe666 commented 2 years ago

@timcouchoud could you confirm the suggestion from @anddev1717 works for you? :)

timcouchoud commented 2 years ago

based on @anddev1717 suggestion I installed libpq-dev before installing V16 again, but unfortunately I get the same error behavior with "active (exited)"

Any other suggestion?

Eureco commented 2 years ago

I am having the same issue.

grahampipes commented 2 years ago

doing the apt-get install libpq-dev before anything else worked for me. Fresh install of Ubuntu 20.04

icf20 commented 6 months ago

getting this today testing version 17 install scirpt

/odoo-bin -c /etc/odooserv-server.conf Traceback (most recent call last): File "/odooserv/odooserv-server/./odoo-bin", line 5, in import odoo File "/odooserv/odooserv-server/odoo/init.py", line 134, in from . import modules File "/odooserv/odooserv-server/odoo/modules/init.py", line 8, in from . import db, graph, loading, migration, module, registry, neutralize File "/odooserv/odooserv-server/odoo/modules/graph.py", line 11, in import odoo.tools as tools File "/odooserv/odooserv-server/odoo/tools/init.py", line 3, in from . import _monkeypatches File "/odooserv/odooserv-server/odoo/tools/_monkeypatches.py", line 12, in from werkzeug.datastructures import FileStorage ModuleNotFoundError: No module named 'werkzeug'