Install Plone 4.3.2 (4307) on a Mageia 3 Linux box

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

Install Plone 4.3.2 (4307) on a Mageia 3 Linux box

Postby dbitouze » Oct 7th, '13, 21:14

Here are sufficient steps to install Plone 4.3.2 (4307) on a Mageia 3 Linux box, and to enable 'eea.daviz' add-on.

Download Plone-4.3.2-UnifiedInstaller

Code: Select all
wget https://launchpad.net/plone/4.3/4.3.2/+download/Plone-4.3.2-UnifiedInstaller.tgz
tar xfj Plone-4.3.2-UnifiedInstaller.tar.bz2
cd Plone-4.3.2-UnifiedInstaller/


Avoid 'pyconfig.h:2:32: error: #include nested too deeply' error during installation
Running directly the installation, for instance with:

Code: Select all
./install.sh standalone

will fail with the error:

Code: Select all
pyconfig.h:2:32: error: #include nested too deeply

To avoid it:

Code: Select all
cd packages
tar xfz virtualenv-1.10.1.tar.gz
cd virtualenv-1.10.1/

then edit the file 'virtualenv.py' to replace its lines 1009 to 1019:

Code: Select all
        multiarch_exec = '/usr/bin/multiarch-platform'
        if is_executable_file(multiarch_exec):
            # In Mageia (2) and Mandriva distros the include dir must be like:
            # virtualenv/include/multiarch-x86_64-linux/python2.7
            # instead of being virtualenv/include/python2.7
            p = subprocess.Popen(multiarch_exec, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
            stdout, stderr = p.communicate()
            # stdout.strip is needed to remove newline character
            inc_dir = join(home_dir, 'include', stdout.strip(), py_version + abiflags)
        else:
            inc_dir = join(home_dir, 'include', py_version + abiflags)

by:

Code: Select all
inc_dir = join(home_dir, 'include', py_version + abiflags)


Install Plone
Install Plone by running:


Code: Select all
./install.sh standalone

After this, check if the default installation is okay by running:

Code: Select all
cd ~/Plone/zinstance
./bin/plonectl fg

If the message:

Code: Select all
 YYYY-MM-DD HH:MM:SS INFO Zope Ready to handle requests

appears, Plone is correctly installed so just hit '^C’ to stop it.

Adding 'eea.daviz' add-on to buildout.cfg
Edit the file 'buildout.cfg' and add, line 79:

Code: Select all
    eea.daviz


Avoid 'gcc: error: /usr/lib/libcurl.a: No such file or directory' error during buildout
Running 'buildout' directly:

Code: Select all
./bin/buildout

will fail with the error:

Code: Select all
gcc: error: /usr/lib/libcurl.a: No such file or directory
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occurred when trying to install pycurl2 7.20.0. Look above this message for any errors that were output by easy_install.
While:
  Installing instance.
  Getting distribution for 'pycurl2'.
Error: Couldn't install: pycurl2 7.20.0

because 'pycurl', which is (indirectly) required by 'eea.daviz'
add-on, is shipped in a too old version. So, in order to avoid this
error, check 'git' RPM is installed and get the very last version of
'pycurl2':

Code: Select all
cd ~/
mkdir git-repositories
cd git-repositories
git clone https://github.com/Lispython/pycurl.git

This should have created a 'pycurl' directory in 'git-repositories' directory.

Then replace 'pycurl2' shipped with Plone by the git-version:

Code: Select all
cd ~/Plone/buildout-cache/downloads/dist/
tar xfz pycurl2-7.20.0.tar.gz
cd pycurl2-7.20.0/
cp -rf ~/git-repositories/pycurl/* .
cd ..
tar cfz pycurl2-7.20.0.tar.gz pycurl2-7.20.0

Finally run 'buildout':

Code: Select all
cd ~/Plone/zinstance
./bin/buildout


Avoid 'ImportError: No module named component.hooks' error
Edit: !!! This error doesn't arise with the recent 7.8 version of eea.daviz !!! The following is hence useless for this version (and the later ones).

Running Plone directly:

Code: Select all
./bin/plonectl fg

will fail with the error:

Code: Select all
[...]
    ZopeXMLConfigurationError: File "/home/bitouze/Plone-not-working/buildout-cache/eggs/eea.daviz-7.7-py2.7.egg/eea/daviz/configure.zcml", line 11.2-11.32
    ZopeXMLConfigurationError: File "/home/bitouze/Plone-not-working/buildout-cache/eggs/eea.daviz-7.7-py2.7.egg/eea/daviz/browser/configure.zcml", line 6.2-12.6
    ImportError: No module named component.hooks

Here are the sufficient steps to avoid it:

Perform two changes in 'daviz.py' file:

Code: Select all
cd ~/Plone/buildout-cache/eggs/eea.daviz-7.7-py2.7.egg/eea/daviz/browser/app/

Edit 'daviz.py' file and replace:
  • line 3:

    Code: Select all
    from zope.app.component.hooks import getSite

    by:

    Code: Select all
    from zope.component.hooks import getSite
  • line 6:

    Code: Select all
    from zope.app.container.interfaces import INameChooser

    by:

    Code: Select all
    from zope.app.component.hooks import getSite

Perform one change in 'controlpanel.py' file

Code: Select all
cd ~/Plone/buildout-cache/eggs/eea.daviz-7.7-py2.7.egg/eea/daviz/controlpanel/

Edit 'controlpanel.py' file and replace line 7:

Code: Select all
from zope.app.component.hooks import getSite

by:

Code: Select all
from zope.component.hooks import getSite
dbitouze
 
Posts: 1
Joined: Oct 7th, '13, 21:12

Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest