Issues upgrading Plone 5.1.6 to 5.2

I am having issues upgrading Plone 5.1.6 to 5.2. When I run buildout:

sudo -u plone bin/buildout
Getting distribution for 'BTrees==4.5.1'.
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
An error occurred when trying to install BTrees 4.5.1. Look above this message for any errors that were output by easy_install.
While:
Installing.
Getting section zeoserver.
Initializing section zeoserver.
Installing recipe plone.recipe.zeoserver.
Getting distribution for 'BTrees==4.5.1'.
Error: Couldn't install: BTrees 4.5.1

Any advice would be most appreciated. Thanks so much.

sudo apt-get install libffi-dev

maybe?

Thank you! Yes, that solved the problem of BTrees. Now this appears:

Version and requirements information containing zc.buildout:
Requirement of plone.recipe.zeoserver==2.0.1: zc.buildout
Requirement of zc.recipe.egg: zc.buildout>=2.12.0
Requirement of zc.buildout: setuptools>=8.0
While:
Installing.
Getting section zeoserver.
Initializing section zeoserver.
Installing recipe plone.recipe.zeoserver.
Error: There is a version conflict.
We already have: zc.buildout 2.5.3
but zc.recipe.egg 2.0.7 requires 'zc.buildout>=2.12.0'.

Any thoughts?

I think that's part of requirements.txt

try a pip install --upgrade zc.buildout

or pip install 'zc.buildout==2.12.0'

I hope you have a python virtual environment to handle the different buildout versions.

Thank you very much. It now tells me that I have upgraded to zc.buildout-2.13.2 but it is still giving me an error:

$ sudo pip install --upgrade zc.buildout
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 '/home/user/.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.
WARNING: The directory '/home/user/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Processing /home/user/.cache/pip/wheels/c7/91/e5/cee51af09e8fbea27100c93aff9a6a267227234625043b3c4f/zc.buildout-2.13.2-py2.py3-none-any.whl
Requirement already satisfied, skipping upgrade: setuptools>=8.0 in /home/user/.local/lib/python2.7/site-packages (from zc.buildout) (42.0.2)
Installing collected packages: zc.buildout
Found existing installation: zc.buildout 2.12.0
Uninstalling zc.buildout-2.12.0:
Successfully uninstalled zc.buildout-2.12.0
Successfully installed zc.buildout-2.13.2

$ sudo -u plone bin/buildout
Version and requirements information containing zc.buildout:
Requirement of plone.recipe.zeoserver==2.0.1: zc.buildout
Requirement of zc.recipe.egg: zc.buildout>=2.12.0
Requirement of zc.buildout: setuptools>=8.0
While:
Installing.
Getting section zeoserver.
Initializing section zeoserver.
Installing recipe plone.recipe.zeoserver.
> Error: There is a version conflict.
> We already have: zc.buildout 2.5.3
> but zc.recipe.egg 2.0.7 requires 'zc.buildout>=2.12.0'.

Sounds like you might have a conflict with version numbers between your venv (pip installed) and buildout. If you have zc.buildout installed in your venv you should pin that version in your buildout.cfg. Same with any other packages that might be in both, like setuptools.

Plone Foundation Code of Conduct