I got errors on buildout since I installed pas.ldap on my local site.
I've reinstalled and what buildout returns is:
[/opt/plone510a/zinstance]# sudo -u plone_buildout ./bin/buildout
Develop: '/opt/plone510a/zinstance/src/ploneicas.site'
error: could not create 'src/ploneicas.site.egg-info': Permission denied
While:
Installing.
Processing develop directory '/opt/plone510a/zinstance/src/ploneicas.site'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/opt/plone510a/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2127, in main
getattr(buildout, command)(args)
File "/opt/plone510a/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 659, in install
installed_develop_eggs = self._develop()
File "/opt/plone510a/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 902, in _develop
zc.buildout.easy_install.develop(setup, dest)
File "/opt/plone510a/zinstance/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1067, in develop
call_subprocess(args)
File "/opt/plone510a/zinstance/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 165, in call_subprocess
% repr(args)[1:-1])
Exception: Failed to run command:
'/opt/plone510a/zinstance/bin/python2.7', '/tmp/tmpOeSbWj', '-q', 'develop', '-mN', '-d', '/opt/plone510a/zinstance/develop-eggs/tmpWBs1K2build'
It fails even if I try to do buildout without that add-on:
[/opt/plone510a/zinstance]# sudo -u plone_buildout ./bin/buildout
Updating instance.
Updating repozo.
Updating backup.
Updating zopepy.
Updating unifiedinstaller.
Updating precompiler.
Compiling Python files.
File "/opt/plone510a/buildout-cache/eggs/zodbpickle-0.7.0-py2.7-linux-x86_64.egg/zodbpickle/pickletools_3.py", line 2049
print("%5d:" % pos, end=' ', file=out)
^
SyntaxError: invalid syntax
File "/opt/plone510a/buildout-cache/eggs/zodbpickle-0.7.0-py2.7-linux-x86_64.egg/zodbpickle/pickle_3.py", line 178
def __init__(self, file, protocol=None, *, fix_imports=True):
^
SyntaxError: invalid syntax
File "/opt/plone510a/buildout-cache/eggs/zodbpickle-0.7.0-py2.7-linux-x86_64.egg/zodbpickle/tests/pickletester_3.py", line 145
class use_metaclass(object, metaclass=metaclass):
^
SyntaxError: invalid syntax
Compiling locale files.
Error while compiling /opt/plone510a/buildout-cache/eggs/python_gettext-3.0-py2.7.egg/pythongettext/tests/test_escape.po
Error while compiling /opt/plone510a/buildout-cache/eggs/python_gettext-3.0-py2.7.egg/pythongettext/tests/test5.po
Updating setpermissions.
setpermissions: Running # Dummy references to force this to execute after referenced parts
echo /opt/plone510a/zinstance/var/backups yes > /dev/null
chmod 600 .installed.cfg
# Make sure anything we've created in var is r/w by our group
find /opt/plone510a/zinstance/var -type d -exec chmod 770 {} \; 2> /dev/null
find /opt/plone510a/zinstance/var -type f -exec chmod 660 {} \; 2> /dev/null
find /opt/plone510a/zinstance/var -type d -exec chmod 770 {} \; 2> /dev/null
find /opt/plone510a/zinstance/var -type f -exec chmod 660 {} \; 2> /dev/null
chmod 754 /opt/plone510a/zinstance/bin/*
chmod: cambiando los permisos de «/opt/plone510a/zinstance/bin/buildout»: Operación no permitida
chmod: cambiando los permisos de «/opt/plone510a/zinstance/bin/easy_install»: Operación no permitida
chmod: cambiando los permisos de «/opt/plone510a/zinstance/bin/easy_install-2.7»: Operación no permitida
I solved it!
The error was that I've been working with the zeo before and now with standalone installation, so I had to change buildout users from plone_daemon to plone_buildout on the buildout.cfg file:
[buildout]
############################################
# Plone Component Versions
# ------------------------
# This version of the Unified Installer has the components of Plone 5
# preloaded so that it can install without an Internet connection.
# If you want to update, uncomment the "http://..." line below,
# edit it to point to the current version URL, comment out the
# "versions.cfg" line and run "bin/buildout" while attached to the
# Internet. Generally, you only want to do that as part of a planned migration.
# Note that if you are updating components, you should also check the versions
# section at the end of this file, since recipes or components other than
# those of Zope and Plone may need updating at the same time.
#
extends =
base.cfg
versions.cfg
# http://dist.plone.org/release/5.1.0/versions.cfg
# If you change your Plone version, you'll also need to update
# the repository link below.
find-links +=
http://dist.plone.org/release/5.1.0
# If you try to start Zope as root, it will change user id to run as
# the effective user specified here. This user id must own the var directory
# of your buildout.
**effective-user = plone_buildout**
# This user will own the rest of the installation, and should be used to
# run buildout.
**buildout-user = plone_buildout**
# A flag to tell the Unified Installer whether or not to document sudo use.
need-sudo = yes
After I found out that some directories had wrong permissions:
[/opt/plone510a/zinstance/src]# ll
total 16
drwxr-sr-- 5 root plone_group 4096 oct 8 14:00 plone.mysite
drwxr-sr-- 5 root plone_group 4096 oct 8 15:20 plone.importexport
-rwxr-xr-- 1 plone_buildout plone_group 62 oct 8 13:55 README.txt
drwxr-sr-- 3 plone_buildout plone_group 4096 oct 8 13:55 z3c.recipe.staticlxml
And I fixed it doing:
chown plone_buildout:plone_group -R plone.mysite/
chown plone_buildout:plone_group -R plone.importexport/