5.1.6 installation fails on debian buster

Hello

Just tried to install plone 5.1.6 ( --build-python standalone ) on a debian buster machine, the default install fails

Getting distribution for 'zope.security==4.1.1'.
WARNING: The easy_install command is deprecated and will be removed in a future version.
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
WARNING: The directory '/root/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
ERROR: Exception:
Traceback (most recent call last):
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 153, in _main
    status = self.run(options, args)
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/pip/_internal/commands/wheel.py", line 158, in run
    resolver.resolve(requirement_set)
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py", line 201, in resolve
    self._resolve_one(requirement_set, req)
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py", line 365, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/pip/_internal/legacy_resolve.py", line 311, in _get_abstract_dist_for
    req.populate_link(self.finder, upgrade_allowed, self.require_hashes)
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 232, in populate_link
    supported_tags=supported_tags,
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/pip/_internal/cache.py", line 239, in get
    supported_tags=supported_tags,
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/pip/_internal/cache.py", line 171, in get
    for wheel_name in self._get_candidates(link, package_name):
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/pip/_internal/cache.py", line 95, in _get_candidates
    return os.listdir(root)
OSError: [Errno 13] Permission denied: '/root/.cache/pip/wheels/b3/3b/ae/2b610a8816b2c1418fb9582f0dd5b59383fe199f009807770b'
error: Command '['/opt/Plone516/zinstance/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/easy_install-elq9f2/zope.security-4.1.1/temp/tmpRfMw9x', '--quiet', 'zope.proxy>=4.1.0']' returned non-zero exit status 2
An error occurred when trying to install /opt/Plone516/buildout-cache/downloads/dist/zope.security-4.1.1.tar.gz. Look above this message for any errors that were output by easy_install.
While:
  Installing.
  Getting section instance.
  Initializing section instance.
  Installing recipe plone.recipe.zope2instance.
  Getting distribution for 'zope.security==4.1.1'.

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/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2174, in main
    getattr(buildout, command)(args)
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/buildout.py", line 701, in install
    [self[part]['recipe'] for part in install_parts]
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1324, in __getitem__
    options._initialize()
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1432, in _initialize
    self.initialize()
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1438, in initialize
    recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1388, in _install_and_load
    allow_hosts=buildout._allow_hosts
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 957, in install
    return installer.install(specs, working_set)
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 730, in install
    for dist in self._get_dist(req, ws):
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 574, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/opt/Plone516/zinstance/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1745, in _move_to_eggs_dir_and_compile
    [tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: need more than 0 values to unpack

I never used the Plone installer but

WARNING: The directory '/root/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

and

OSError: [Errno 13] Permission denied: '/root/.cache/pip/wheels/b3/3b/ae/2b610a8816b2c1418fb9582f0dd5b59383fe199f009807770b'

indicate the problem.

Which user did you use to install and what command (with or without sudo) did you execute to trigger the installation?

1 Like

i did see the warning but not the OSError ...

Still

I am root
I launch the command "./install.sh --target=/opt/Plone516 --build-python standalone" ( no sudo used )

I erased the /root/.cache tree and the same error occurred though all files in /root/.cache are owned by root

stange thing is that installing with a normal user works fine ( i tried with sudo plone_buildout ) ; but installing as root fails

It's certainly possible that the installer assumes that anyone wanting a superuser install would use sudo rather than be logged in as root.

Plone Foundation Code of Conduct