Struggling to install Plone on Ubuntu droplet

I created a Ubuntu 16.04 x64 Droplet on Digitalocean and have been following this tutorial to install Plone. Everything seemingly looks like it's going well, but the install fails a few minutes after I run

./install.sh

I followed the instructions but don't know why I'm seeing this error. Any idea why?

Here's as much info as I know to provide:

root@plone:~# tar -xf Plone-5.0.4-UnifiedInstaller.tgz
root@plone:~# cd Plone-5.0.4-UnifiedInstaller
root@plone:~/Plone-5.0.4-UnifiedInstaller# ./install.sh
Testing /usr/bin/python2.7 for Zope/Plone requirements....
/usr/bin/python2.7 looks OK. We will use it.
Root install method chosen. Will install for use by users:
ZEO & Client Daemons: plone_daemon
Code Resources & buildout: plone_buildout
Detailed installation log being written to /root/Plone-5.0.4-UnifiedInstaller/install.log
Installing Plone 5.0.4 at /opt/plone
Using useradd and groupadd to create users and groups.
Creating Python virtual environment.
New python executable in /opt/plone/zinstance/bin/python2.7
Also creating executable in /opt/plone/zinstance/bin/python
Installing setuptools, pip, wheel...done.
Installing zc.buildout in virtual environment.
Unpacking buildout cache to /opt/plone/buildout-cache
Copying Plone-docs
Copying buildout skeleton
Building Zope/Plone; this takes a while...
Buildout returned an error code: 1; Aborting.
Buildout failed. Unable to continue
Installation has failed.
See the detailed installation log at /root/Plone-5.0.4-UnifiedInstaller/install.log
to determine the cause.
root@plone:~/Plone-5.0.4-UnifiedInstaller# ls
base_skeleton docs install.sh tests
buildenv.sh fetch_versions.py Licenses update_dist.sh
buildenv.sh.in helper_scripts packages UPDATING_ME.txt
buildout_templates HISTORY.txt Plone-docs version.txt
config.log init_scripts preflight
config.status install.log README.rst

root@plone:~/Plone-5.0.4-UnifiedInstaller# nano install.log

Detailed installation log
Starting at Wed Jan 18 08:19:01 UTC 2017
Processing ./packages/zc.buildout-2.5.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): setuptools>=8.0 in /o$
Building wheels for collected packages: zc.buildout
Running setup.py bdist_wheel for zc.buildout: started
^[[?25l Running setup.py bdist_wheel for zc.buildout: finished with status 'do$
^[[?25h Stored in directory: /root/.cache/pip/wheels/ce/83/77/6ff90b2f844fcc85$
Successfully built zc.buildout
Installing collected packages: zc.buildout
Successfully installed zc.buildout-2.5.0
You are using pip version 8.0.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Creating directory '/opt/plone/zinstance/parts'.
Creating directory '/opt/plone/zinstance/develop-eggs'.
Not found: /opt/plone/buildout-cache/downloads/dist/ZODB3/
Not found: /opt/plone/buildout-cache/downloads/dist/ZODB3/
Getting distribution for 'ZODB3==3.10.5'.
In file included from src/BTrees/BTreeModuleTemplate.c:394:0,
from src/BTrees/_IIBTree.c:34:
src/BTrees/BucketTemplate.c: In function ‘bucket_traverse’:
src/BTrees/BucketTemplate.c:1627:12: warning: variable ‘len’ set but not used [$
int i, len;
^
In file included from src/BTrees/BTreeModuleTemplate.c:394:0,
from src/BTrees/_IFBTree.c:34:
src/BTrees/BucketTemplate.c: In function ‘bucket_traverse’:
src/BTrees/BucketTemplate.c:1627:12: warning: variable ‘len’ set but not used [$
int i, len;
^
In file included from src/BTrees/BTreeModuleTemplate.c:394:0,
from src/BTrees/_fsBTree.c:83:
src/BTrees/BucketTemplate.c: In function ‘bucket_traverse’:
src/BTrees/BucketTemplate.c:1627:12: warning: variable ‘len’ set but not used [$
int i, len;
^
In file included from src/BTrees/BTreeModuleTemplate.c:394:0,
from src/BTrees/_LLBTree.c:36:
src/BTrees/BucketTemplate.c: In function ‘bucket_traverse’:
src/BTrees/BucketTemplate.c:1627:12: warning: variable ‘len’ set but not used [$
int i, len;
^
In file included from src/BTrees/BTreeModuleTemplate.c:394:0,
from src/BTrees/_LFBTree.c:36:
src/BTrees/BucketTemplate.c: In function ‘bucket_traverse’:
src/BTrees/BucketTemplate.c:1627:12: warning: variable ‘len’ set but not used [$
int i, len;
^
Got ZODB3 3.10.5.
Not found: /opt/plone/buildout-cache/downloads/dist/zope.interface/
Not found: /opt/plone/buildout-cache/downloads/dist/zope.interface/
Getting distribution for 'zope.interface==3.6.7'.
Got zope.interface 3.6.7.
Not found: /opt/plone/buildout-cache/downloads/dist/zope.security/
Not found: /opt/plone/buildout-cache/downloads/dist/zope.security/
Getting distribution for 'zope.security==3.7.4'.
Got zope.security 3.7.4.
Not found: /opt/plone/buildout-cache/downloads/dist/zope.proxy/
Not found: /opt/plone/buildout-cache/downloads/dist/zope.proxy/
Getting distribution for 'zope.proxy==3.6.1'.
Got zope.proxy 3.6.1.
Not found: /opt/plone/buildout-cache/downloads/dist/zope.i18nmessageid/
Not found: /opt/plone/buildout-cache/downloads/dist/zope.i18nmessageid/
Getting distribution for 'zope.i18nmessageid==3.5.3'.
Got zope.i18nmessageid 3.5.3.
Not found: /opt/plone/buildout-cache/downloads/dist/zope.container/
Not found: /opt/plone/buildout-cache/downloads/dist/zope.container/
Getting distribution for 'zope.container==3.11.2'.
Got zope.container 3.11.2.
Not found: /opt/plone/buildout-cache/downloads/dist/initgroups/
Not found: /opt/plone/buildout-cache/downloads/dist/initgroups/
Getting distribution for 'initgroups==2.13.0'.
Got initgroups 2.13.0.
Not found: /opt/plone/buildout-cache/downloads/dist/Record/
Not found: /opt/plone/buildout-cache/downloads/dist/Record/
Getting distribution for 'Record==2.13.0'.
Got Record 2.13.0.
Not found: /opt/plone/buildout-cache/downloads/dist/Products.ZCTextIndex/
Not found: /opt/plone/buildout-cache/downloads/dist/Products.ZCTextIndex/
Getting distribution for 'Products.ZCTextIndex==2.13.5'.
warning: no previously-included files matching '.dll' found anywhere in distribution
warning: no previously-included files matching '
.pyc' found anywhere in distribution
warning: no previously-included files matching '.pyo' found anywhere in distribution
warning: no previously-included files matching '
.so' found anywhere in distribution
src/Products/ZCTextIndex/okascore.c: In function ‘initokascore’:
src/Products/ZCTextIndex/okascore.c:127:12: warning: variable ‘m’ set but not used [-Wunused-but-set-variable]
PyObject m;
^
Got Products.ZCTextIndex 2.13.5.
Not found: /opt/plone/buildout-cache/downloads/dist/Persistence/
Not found: /opt/plone/buildout-cache/downloads/dist/Persistence/
Getting distribution for 'Persistence==2.13.2'.
Got Persistence 2.13.2.
Not found: /opt/plone/buildout-cache/downloads/dist/MultiMapping/
Not found: /opt/plone/buildout-cache/downloads/dist/MultiMapping/
Getting distribution for 'MultiMapping==2.13.0'.
src/MultiMapping/_MultiMapping.c:159:2: warning: initialization from incompatible pointer type [-Wincompatible-poin$
(inquiry)MM_length, /mp_length/
^
src/MultiMapping/_MultiMapping.c:159:2: note: (near initialization for ‘MM_as_mapping.mp_length’)
Got MultiMapping 2.13.0.
Not found: /opt/plone/buildout-cache/downloads/dist/Missing/
Not found: /opt/plone/buildout-cache/downloads/dist/Missing/
Getting distribution for 'Missing==2.13.1'.
Got Missing 2.13.1.
Not found: /opt/plone/buildout-cache/downloads/dist/ExtensionClass/
Not found: /opt/plone/buildout-cache/downloads/dist/ExtensionClass/
Getting distribution for 'ExtensionClass==4.1.2'.
warning: no previously-included files matching '
.dll' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '
.pyo' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
Got ExtensionClass 4.1.2.
Not found: /opt/plone/buildout-cache/downloads/dist/DocumentTemplate/
Not found: /opt/plone/buildout-cache/downloads/dist/DocumentTemplate/
Getting distribution for 'DocumentTemplate==2.13.2'.
warning: no previously-included files matching '
.dll' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '
.pyo' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
src/DocumentTemplate/cDocumentTemplate.c:169:3: warning: initialization from incompatible pointer type [-Wincompati$
(inquiry)InstanceDict_length, /mp_length/
^
src/DocumentTemplate/cDocumentTemplate.c:169:3: note: (near initialization for ‘InstanceDict_as_mapping.mp_length’)
src/DocumentTemplate/cDocumentTemplate.c:600:2: warning: initialization from incompatible pointer type [-Wincompati$
(inquiry)MM_length, /mp_length/
^
src/DocumentTemplate/cDocumentTemplate.c:600:2: note: (near initialization for ‘MM_as_mapping.mp_length’)
Got DocumentTemplate 2.13.2.
Not found: /opt/plone/buildout-cache/downloads/dist/Acquisition/
Not found: /opt/plone/buildout-cache/downloads/dist/Acquisition/
Not found: /opt/plone/buildout-cache/downloads/dist/Acquisition/
Getting distribution for 'Acquisition==4.2.2'.
warning: no previously-included files matching '
.dll' found anywhere in distribution
warning: no previously-included files matching '.pyc' found anywhere in distribution
warning: no previously-included files matching '
.pyo' found anywhere in distribution
warning: no previously-included files matching '.so' found anywhere in distribution
Got Acquisition 4.2.2.
Not found: /opt/plone/buildout-cache/downloads/dist/AccessControl/
Not found: /opt/plone/buildout-cache/downloads/dist/AccessControl/
Getting distribution for 'AccessControl==3.0.12'.
warning: no files found matching '
.rst'
warning: no previously-included files matching '.dll' found anywhere in distribution
warning: no previously-included files matching '
.pyc' found anywhere in distribution
warning: no previously-included files matching '.pyo' found anywhere in distribution
warning: no previously-included files matching '
.so' found anywhere in distribution
Got AccessControl 3.0.12.
Installing instance.
/opt/plone/zinstance/local/lib/python2.7/site-packages/pkg_resources/init.py:192: RuntimeWarning: You have iter$
stacklevel=1,
Not found: /opt/plone/buildout-cache/downloads/dist/Pillow/
Not found: /opt/plone/buildout-cache/downloads/dist/Pillow/
Getting distribution for 'Pillow==3.1.1'.
warning: no previously-included files found matching '.editorconfig'
_imaging.c: In function ‘getink’:
_imaging.c:474:9: warning: ‘r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
int r, g, b, a;
^
encode.c: In function ‘PyImaging_EncoderNew’:
encode.c:57:43: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
if(!PyType_Ready(&ImagingEncoderType) < 0)
^
Single threaded build, not installing mp_compile:1 processes

PIL SETUP SUMMARY

version Pillow 3.1.1
platform linux2 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609]

*** TKINTER support not available
--- JPEG support available
*** OPENJPEG (JPEG2000) support not available
--- ZLIB (PNG/ZIP) support available
*** LIBTIFF support not available
*** FREETYPE2 support not available
*** LITTLECMS2 support not available
*** WEBP support not available
*** WEBPMUX support not available

To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.

To check the build, run the selftest.py script.

Got Pillow 3.1.1.
Not found: /opt/plone/buildout-cache/downloads/dist/lxml/
Not found: /opt/plone/buildout-cache/downloads/dist/lxml/
Getting distribution for 'lxml==3.5.0'.
x86_64-linux-gnu-gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
/tmp/easy_install-3B2Nq9/lxml-3.5.0/temp/xmlXPathInitJrdvwp.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main (int argc, char **argv) {
^
Building lxml version 3.5.0.
Building without Cython.
Using build configuration of libxslt 1.1.28
Compile failed: command 'x86_64-linux-gnu-gcc' failed with exit status 4
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 4
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 the size of your droplet? Sometimes lxml installation fails because of too little memory.

maybe I'm wrong but that message seems to point to missing OS dependencies; install them and try again:

http://docs.plone.org/manage/installing/installation.html

also, don't forget upgrade your OS before the installation and make sure you're running Ubuntu 16.04.1 at least.

no way; smallest droplet is 512MB of memory and that's more than enough; we have many droplets this size.

1 Like

You are absolutely right: usually a 512MB machine is fine. But maybe there are some other services already running taking some memory. And maybe there is no swap on this machine. I had this same error for a customer once, also on a DO droplet.

1 Like

No swap is definitely a likely candidate - this has caught me out repeatedly on DO droplets, as many things misbehave with none. There is a DO knowledgeable article about how to create a swapfile on an existing droplet, so easy to test/fix.

1 Like

could be, but that's not what the buildout log error reads.

FTR, the tutorial is How To Add Swap on Ubuntu 12.04, and you can read there:

using swap with SSDs can cause issues with hardware degradation over time. Due to this consideration, we do not recommend enabling swap on DigitalOcean or any other provider that utilizes SSD storage. Doing so can impact the reliability of the underlying hardware for you and your neighbors.

based on my latest tests using 512MB droplets, I recommend the following settings:

[instance]
zodb-cache-size = 15000
zserver-threads = 2

[supervisor]
eventlisteners =
    memmon TICK_60 ${buildout:bin-directory}/memmon [-g app=300MB]

Thanks to all that offered help. I added a 2GB swap file to my Droplet (512MB ram) and managed to complete that step without errors and reach the setup page.

1 Like

awesome! BTW, we have enabled swap in all droplets (just-in-case™) but we try not to use it at all.

Next time, you can just temporary increase your droplet size for the installation. Digitalocean allows to downsize again.