Error installing Plone-5 on Debian 8.7 [RESOLVED]

Hi, everyone. I am not sure if I am posting to the right channel. Please excuse me. I recently tried to install Plone-5 on my Debian 8.7 linux laptop. Checked the python version (2.7) and libraries mentioned in the Plone-5 site, made the buildout.cfg, and following their instructions. When I made the buildout at the Plone-5/zinstance directory by issued the command:
$ ./bin/buildout
I got the error messages below:
Creating directory '/home/premch/Plone-5/zinstance/eggs'.
Creating directory '/home/premch/Plone-5/zinstance/parts'.
Creating directory '/home/premch/Plone-5/zinstance/develop-eggs'.
Getting distribution for 'zc.buildout==2.5.3'.
Got zc.buildout 2.5.3.
Getting distribution for 'setuptools==26.1.1'.
warning: no files found matching '*' under directory 'setuptools/_vendor'
Got setuptools 26.1.1.
Upgraded:
zc.buildout version 2.5.3,
setuptools version 26.1.1;
restarting.
Generated script '/home/premch/Plone-5/zinstance/bin/buildout'.
Getting distribution for 'plone.recipe.zope2instance==4.2.22'.
warning: no previously-included files matching '*pyc' found anywhere in distribution
Got plone.recipe.zope2instance 4.2.22.
Getting distribution for 'ZODB3==3.10.7'.
In file included from src/BTrees/_OOBTree.c:32:0:
src/BTrees/BTreeModuleTemplate.c:15:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
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 /tmp/tmpLe8Ozjget_dist/ZODB3-3.10.7.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 'ZODB3==3.10.7'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2123, in main
getattr(buildout, command)(args)
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 680, in install
[self[part]['recipe'] for part in install_parts]
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1274, in getitem
options._initialize()
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1382, in _initialize
self.initialize()
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1388, in initialize
recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1338, in _install_and_load
allow_hosts=buildout._allow_hosts
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 913, in install
return installer.install(specs, working_set)
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 714, in install
for dist in self._get_dist(req, ws):
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 563, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/home/premch/Plone-5/zinstance/local/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1699, 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 knew that there is no header file "Python.h" in the src/BTrees/_OOBTree.c file. But since I am new to Plone and python. I would be really grateful if someone could give me hints as to solve this problem?

Hi - could you include here the contents of your buildout.cfg? Use the "Preformatted text" editing icon on the contents of the file (or any code you paste).

...and welcome to Plone! :slight_smile:

[buildout]
extends =
http://dist.plone.org/release/5-latest/versions.cfg

parts =
instance

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs =
Plone
Pillow

Thanks a lot. The above is the buildout.cfg file that I just copied from Plone site.

[buildout]
extends =
http://dist.plone.org/release/5-latest/versions.cfg

parts =
instance

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs =
Plone
Pillow

This one is the right one, with indents. Sorry for the previous one.Preformatted text

indent preformatted text by 4 spaces

[buildout]
extends =
http://dist.plone.org/release/5-latest/versions.cfg

parts =
instance

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs =
Plone
Pillow

indent preformatted text by 4 spaces

Hope this one has indents.

Seems that I do not know how to use the preformatted text. Any suggestion please.
`


[buildout]
extends =
    http://dist.plone.org/release/5-latest/versions.cfg

parts =
    instance

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address = 8080
eggs =
    Plone
    Pillow

Hope this has indents.

1 Like

Seems you are missing the Python development headers. either use a self compiled Python or install the development package.

1 Like

Thanks so much. Is this meaning that I have to install the python development package (2.7 dev.). I thought python 2.7 on Debian 8.7 could do.

@tomgross is right, it looks like you are missing the dev packages for your python version.

try:

apt-get install python2.7-dev

you probably also want to install these package, to have the full support of all features:

    - build-essential                                                                                                                                                                                                                                     
    - python2.7-dev                                                                                                                                                                                                                                          
    - python-virtualenv                                                                                                                                                                                                                                   
    - python-pip                                                                                                                                                                                                                                          
    - libz-dev                                                                                                                                                                                                                                            
    - libssl-dev                                                                                                                                                                                                                                          
    - libjpeg-dev                                                                                                                                                                                                                                         
    - libxslt1-dev                                                                                                                                                                                                                                        
    - libjpeg-dev                                                                                                                                                                                                                                         
    - libopenjpeg-dev                                                                                                                                                                                                                                     
    - libfreetype6-dev                                                                                                                                                                                                                                    
    - libwebp-dev                                                                                                                                                                                                                                         
    - poppler-utils                                                                                                                                                                                                                                       
    - wv                                                                                                                                                                                                                                                  
    - lynx-cur                                                                                                                                                                                                                                            
    - unzip
1 Like

Thanks so much. I'll do that. Will come back to report how it is. Thanks again both of you.

Kudos to tomgross and Maik Derstappen! I got the Plone-5 installed. I have to learn a lot to use Plone, though. DId not know before that python2.7 and python2.7-dev are different. Thanks both of you.

2 Likes

@premch you need the dev-packages on Debian systems only for compiling code.
Plone does compile some extensions, thats why you need these files.
On some distributions dev is included in the normal packages, but Debian based systems have them separate, to save space. Enjoy :wink:

@MrTango, Thanks a lot, this surely will further my mileage on Plone.

1 Like