This is caused by Anaconda Python shipping their own versions of various system libraries. It means Anaconda Python cannot be used in embedded applications where the application it is embedded in (Apache in this case) already pulls in original system libraries of the same name.
If you attempt to override which library is used, you will break other things in Apache, or in other Apache modules, which need that same library. You can try disabling mod_php if you are loading that with Apache, but don't actually need it, as that could be why it is being pulled in. You also might try using mod_wsgi-express instead and run standalone Apache, and have front end Apache proxy to that, but that will not help if it is Apache itself which needs that library. In short, Anaconda Python is almost at the point of being unusable with mod_wsgi due to conflicts with this library and also SSL libraries if need mod_ssl in Apache. Graham > On 26 Jul 2018, at 9:05 am, Alaister Moull <[email protected]> wrote: > > Hi all, mod_wsgi is great, thank you Graham. > > I had(still have apart from below) a working rhel7, httpd2.4, python install > with conda via mod_wsgi. > > Then I tried to use opencv. > > everything runs fine from the conda command line. > > ldd for the python/lib/libpng16 shows correct linking with python/lib/libz > (1.2.11) > > however apache throws an error on 'import opencv', reporting libz 1.2.9 > required as its seems to use the libz loaded by httpd (/lib64/libz) which for > RHEL7 is 1.2.7. > > (/lib64/libz.so.6: version ZLIB_1.2.9 required by > /opt/miniconda/lib/libpng16.so.16) > > I can work around this by using LD_PRELOAD=python/lib/libz /bin/httpd and > everything works, but I can't figure out how to get the same to work for > systemctl (since LD_PRELOAD is ignored by design) > > Any pointers as to how to fix this? I suspect it to be a bug in the libpng > build but I'm not sure. > > Thanks > > Alaister > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/modwsgi > <https://groups.google.com/group/modwsgi>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
