Running Plone 5.2.5 installer on macOS 11.6 – error building Pillow / missing zlib files

Continuing the discussion from Running Plone 5.2.5 unified installer on macOS 12:

OK this time (different machine), the installer failed trying to install Pillow. Going to the ~/Plone/zinstance folder and bin/pip install Pillow==6.2.2 failed with the same error, that the needed zlib include files could not be found.


The headers or library files could not be found for zlib,
a required dependency when compiling Pillow from source.

This was what worked: homebrew - brew install zlib-devel on Mac OS X Mavericks - Stack Overflow

For compilers to find zlib you may need to set:

export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"

then bin/pip install Pillow==6.2.2 succeeded.

I reran the ./install.sh standalone command and it succeeded (after I commented out line 812 that exits if the RINSTANCE_HOME directory already exists...we should make that an option)


# Determine and check instance home
if [ $INSTALL_ZEO -eq 1 ]; then
    INSTANCE_HOME=$ZEOCLUSTER_HOME
elif [ $INSTALL_STANDALONE -eq 1 ]; then
    INSTANCE_HOME=$RINSTANCE_HOME
fi
if [ -x "$INSTANCE_HOME" ]; then
    eval "echo \"$INSTANCE_HOME_EXISTS\""
#    exit 1
fi
1 Like