Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building wheel for lxml (setup.py) ... error #243

Closed
IlirBajrami opened this issue Jun 17, 2020 · 18 comments
Closed

Building wheel for lxml (setup.py) ... error #243

IlirBajrami opened this issue Jun 17, 2020 · 18 comments

Comments

@IlirBajrami
Copy link

IlirBajrami commented Jun 17, 2020

hi there. imtrying to install odoo in DigitalOcean droplet using your script in ubuntu 20.04.
after the script finished installing i tried accessing odoo at port 8069 but didnt get any result then i scrolled up and noticed 2 errors:

` ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6kpb7w57/lxml/setup.py'"'"'; file='"'"'/tmp/pip-install-6kpb7w57/lxml/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-bx3ifawh
cwd: /tmp/pip-install-6kpb7w57/lxml/
Complete output (84 lines):
Building lxml version 4.3.2.
Building without Cython.
Using build configuration of libxslt 1.1.34
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/lxml
copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/builder.py -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/sax.py -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/init.py -> build/lib.linux-x86_64-3.8/lxml
creating build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/init.py -> build/lib.linux-x86_64-3.8/lxml/includes
creating build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.8/lxml/html
copying src/lxml/html/init.py -> build/lib.linux-x86_64-3.8/lxml/html
creating build/lib.linux-x86_64-3.8/lxml/isoschematron
copying src/lxml/isoschematron/init.py -> build/lib.linux-x86_64-3.8/lxml/isoschematron
copying src/lxml/etree.h -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/etree_api.h -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.8/lxml
copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/init.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.8/lxml/includes
copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.8/lxml/includes
creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources
creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/rng
copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/rng
creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl
copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl
creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/src
creating build/temp.linux-x86_64-3.8/src/lxml
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 -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/usr/include/python3.8 -c src/lxml/etree.c -o build/temp.linux-x86_64-3.8/src/lxml/etree.o -w
x86_64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1
creating tmp
cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInituhszi0mm.c -o tmp/xmlXPathInituhszi0mm.o
cc tmp/xmlXPathInituhszi0mm.o -lxml2 -o a.out
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for lxml `

and below this one:

ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6kpb7w57/lxml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6kpb7w57/lxml/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-0lsx7d1q/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/lxml cwd: /tmp/pip-install-6kpb7w57/lxml/ Complete output (83 lines): Building lxml version 4.3.2. Building without Cython. Using build configuration of libxslt 1.1.34 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/lxml copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/builder.py -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/sax.py -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/__init__.py -> build/lib.linux-x86_64-3.8/lxml creating build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/__init__.py -> build/lib.linux-x86_64-3.8/lxml/includes creating build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/builder.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/clean.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/diff.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/defs.py -> build/lib.linux-x86_64-3.8/lxml/html copying src/lxml/html/__init__.py -> build/lib.linux-x86_64-3.8/lxml/html creating build/lib.linux-x86_64-3.8/lxml/isoschematron copying src/lxml/isoschematron/__init__.py -> build/lib.linux-x86_64-3.8/lxml/isoschematron copying src/lxml/etree.h -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/etree_api.h -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-3.8/lxml copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/__init__.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-3.8/lxml/includes copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-3.8/lxml/includes creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/rng copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/rng creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl creating build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.8/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 running build_ext building 'lxml.etree' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/src creating build/temp.linux-x86_64-3.8/src/lxml 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 -DCYTHON_CLINE_IN_TRACEBACK=0 -I/usr/include/libxml2 -Isrc -Isrc/lxml/includes -I/usr/include/python3.8 -c src/lxml/etree.c -o build/temp.linux-x86_64-3.8/src/lxml/etree.o -w x86_64-linux-gnu-gcc: fatal error: Killed signal terminated program cc1 compilation terminated. Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 1 cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitlyme5kmf.c -o tmp/xmlXPathInitlyme5kmf.o cc tmp/xmlXPathInitlyme5kmf.o -lxml2 -o a.out 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-6kpb7w57/lxml/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6kpb7w57/lxml/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-0lsx7d1q/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/lxml Check the logs for full command output.

how to fix this issue pls?

@Yenthe666
Copy link
Owner

Did you use a very small droplet? Which one did you use?

@chris001
Copy link

How much RAM your server have?

@IlirBajrami
Copy link
Author

Did you use a very small droplet? Which one did you use?

i used the smallest one. $5 a month

@IlirBajrami
Copy link
Author

How much RAM your server have?

/ 1 GB Memory / 25 GB Disk / FRA1 - Ubuntu 20.04 (LTS) x64

@jovar-dev
Copy link
Contributor

I had the same problem few minutes ago. I tried install Odoo 12 in a droplet with 1GB of RAM. To fix it, you need to create a droplet with at least 2 GB. With the Odoo 13 script the same does not happen, it can be installed normally in a droplet with 1GB of RAM.

@IlirBajrami
Copy link
Author

I had the same problem few minutes ago. I tried install Odoo 12 in a droplet with 1GB of RAM. To fix it, you need to create a droplet with at least 2 GB. With the Odoo 13 script the same does not happen, it can be installed normally in a droplet with 1GB of RAM.

ironically i was installing odoo13 :) didnt have time to try with bigger droplet yet. will report it as soon as i try.

@Yenthe666
Copy link
Owner

Yeah the issue is known on DO when you use droplets of 1GB of RAM. It needs 2GB at least or it will often fail on the deployment of the wheel part.

@fourthcore
Copy link

Issues running in UBUNTO 20 Server, after installation refuse to connect?

  • Firewall already set to allow,
  • Service required all are running.

Kindly advice.....

@MihranThalhath
Copy link

Installing lxml as a dist package should fix this issue on instance with less RAM. Even though 1 GB RAM is less, a very small business might only need that.

@Yenthe666
Copy link
Owner

Don't ever take a 1GB RAM server, it's bound to fail sooner or later :)

@topeshittu
Copy link

Hello, After installing the enterprise version, i keep getting the community version instead. Please what could be wrong. I modified the script and set is Enterprise to be true. It asked for my github details while installing to, please help.

@gikwereresteven
Copy link

Hello
How I can solve the problem of postgresql
activate(exited) I use scripts in few days was working well but now database in of because of this activate(exited)

@hilarak
Copy link

hilarak commented Feb 9, 2021

solution for wheel LXML setup issue
It possibly occurs while any conflicts in python versions and probably their headers are not installed.
try to update python-dev for the related python version that you are using for ODOO.
eg: sudo apt-get install python3.6-dev where I have 3.6,3.7,3.8 versions in Ubuntu 20.04

@kyotr
Copy link

kyotr commented Feb 12, 2021

I never had issue while using odoo script on small droplet 1 GB Memory / 25 GB Disk. i always add swap file maybe thats the reason.

sudo fallocate -l 2g /mnt/2GiB.swap
sudo chmod 600 /mnt/2GiB.swap
sudo mkswap /mnt/2GiB.swap
sudo swapon /mnt/2GiB.swap
echo '/mnt/2GiB.swap swap swap defaults 0 0' | sudo tee -a /etc/fstab

i just finished installing one with no issue (except wkhtmltopdf version issue)

fixed with:

sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install –f

@vijaygwala
Copy link

very usefull it worked

@kprempeh
Copy link

after creating my droplet and installing odoo on digital ocean, i cant print because of this error, Unable to find Wkhtmltopdf on this system. The report will be shown in html. i need help generation pdf. i tried the solution from @kyotr but still issue persist.

@MuhammedNoufalI
Copy link

Can we solve the issue by adding more amount of swap space @Yenthe666

@Yenthe666
Copy link
Owner

More RAM always does the trick :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests