This time I was attempting to install Zoneminder on top of a FreeNAS installation. FreeNAS is based on FreeBSD, and for my version of FreeNAS it was based on FreeBSD 11.0. I’ve been using FreeBSD since 2001, after I decided to take a break from Linux when yet another local root exploit was discovered. Currently about half of my personal machines still run FreeBSD.

When installing Zoneminder, I ran into an issue where php-fpm would throw the error “/lib/libz.so.6: version ZLIB_1.2.9 required by /usr/local/lib/libpng16.so.16 not found in Unknown on line 0” upon start. A bit of googling showed that I wasn’t the only one to be caught by this.

In fact, there were a lot of threads indicating this issue. And pretty much all answers were the same as in this thread: “stop whining and upgrade your OS”.  Yes, that’s how FreeBSD works these days, which is one of the main reasons why I’m in the process of switching back to Linux. I fail to see how a three-month support period on a release would work in production. So screw you, FreeBSD.

Anyway, back on topic. How to fix this? After some poking around I reinstalled libpng from the ports directory. Simply cd to /usr/ports/graphics/png/ and type make install ALLOW_UNSUPPORTED_SYSTEM=yes. Installation will fail, but don’t worry, just cd to the working directory (in my case, /usr/ports/graphics/png/work/libpng-1.6.34 ) and type make install.

All done:

root@zoneminder:/var/run/zm # service php-fpm restart
 Performing sanity check on php-fpm configuration:
 [05-Jan-2018 10:42:58] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Stopping php_fpm.
 Waiting for PIDS: 47594.
 Performing sanity check on php-fpm configuration:
 [05-Jan-2018 10:42:58] NOTICE: configuration file /usr/local/etc/php-fpm.conf test is successful

Starting php_fpm.
 root@zoneminder:/var/run/zm #

 

 

Leave a Reply