Unified Installer 5.0.3 and up failed on CentOS 6.x

Hi,

I tried to install Plone 5.0.4 with Unified Installer on CentOS 6.5 sever but it failed.
I'd successfully installed Plone 5.0.2 but Plone 5.0.3 and Plone 5.0.4 failed as follows.

Install option :
./install.sh standalone --target=(install path) --build-python --static-lxml=yes

Here are error log. I'm not sure but It seems that something wrong with lxml install.
CentoOS has obsolete libxml rpm, so '--static-lxml=yes' option is needed.

Is there any quick fix to solve this issue?

===========================================================
src/lxml/lxml.etree.c:232403: error: ‘XML_XPATH_INVALID_CTXT_POSITION’ undeclared (first use in this function)
src/lxml/lxml.etree.c:232651: error: ‘LIBXSLT_VERSION’ undeclared (first use in this function)
src/lxml/lxml.etree.c:232664: error: ‘xsltLibxsltVersion’ undeclared (first use in this function)
src/lxml/lxml.etree.c:232677: error: ‘__pyx_v_4lxml_5etree_XSLT_DOC_DEFAULT_LOADER’ undeclared (first use in this function)
src/lxml/lxml.etree.c:232677: error: ‘xsltDocDefaultLoader’ undeclared (first use in this function)
src/lxml/lxml.etree.c:232687: error: ‘xsltDocLoaderFunc’ undeclared (first use in this function)
src/lxml/lxml.etree.c:232687: error: expected ‘)’ before ‘__pyx_f_4lxml_5etree__xslt_doc_loader’
src/lxml/lxml.etree.c: トップレベル:
src/lxml/lxml.etree.c:237283: error: expected ‘)’ before ‘value’
src/lxml/lxml.etree.c:237739: error: expected ‘)’ before ‘value’
src/lxml/lxml.etree.c:237975: error: expected ‘)’ before ‘value’
Building lxml version 3.5.0.
Building without Cython.
ERROR: /bin/sh: xslt-config: command not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
Compile failed: command 'gcc' failed with exit status 1
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occurred when trying to install lxml 3.5.0. Look above this message for any errors that were output by easy_install.
While:
Installing instance.
Getting distribution for 'lxml==3.5.0'.
Error: Couldn't install: lxml 3.5.0

Thanks you.
Shigeo Honda

These are the dependenices I use when installing on a RedHat based 6.x server.
Should work for CentOS also

yum install git gcc-c++ patch openssl-devel libjpeg-devel libxslt-devel readline-devel make which -y

I honestly haven't tested this with 5.0.3 though.

1 Like

Thank you, David.

I've installed RPM packages you mentioned and I've successfully installed Plone 5.0.4.
I don't know exactly which packaged was needed to install 5.0.4.

Anyway, thank you guys.

Glad to hear that it worked.

5.0.4 - 5.0.6 result same error in centos 6.5 vps.

Any possible fix?

Random question, how much memory does your VPS come with?

"Same error" meaning you were unable to build libxml?

you're missing libxml2-devel and/or libxml2; to install Plone in CentOS you need the following:

yum install -y epel-release
yum update -y
yum install -y gcc gcc-g++ make tar bzip2 gzip openssl-devel libxml2-devel libxml2 libxslt-devel bzip2-libs zlib-devel python-setuptools python-devel python-virtualenv libjpeg-turbo-devel readline-devel python-imaging python-pip wv poppler-utils git

There are two reasons I've seen lxml fail.

  1. Due to missing dependencies
  2. Due to low memory (512MB or less)

1024

yes i think so.

===
Building without Cython.
Using build configuration of libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /usr/lib64
Compile failed: command 'gcc' failed with exit status 1
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occurred when trying to install lxml 3.5.0. Look above this message for any errors that were output by easy_install.
While:
Installing instance.
Getting distribution for 'lxml==3.5.0'.
Error: Couldn't install: lxml 3.5.0

What is your server's memory, disk, and swap usage?

I just successfully tested the install on CentOS 6.8 VM with the command lines:

sudo yum install gcc-c++ patch openssl-devel libjpeg-devel libxslt-devel readline-devel make which python-devel wv poppler-utils
./install.sh standalone --build-python --static-lxml=yes

This was on a virtual machine with 490MB total memory, but it also had around 1.5GB
swap, which allowed it to complete the big builds.

Thanks, I Can build it after add swap many thanks.