libvips/php-vips

libvips.so.42 not found in correct path

ganicus opened this issue · 5 comments

Here is the location of my libvips.so.42:

sudo find / -name "libvips.so.42"
/usr/lib/x86_64-linux-gnu/libvips.so.42
/usr/local/lib/libvips.so.42

I keep getting this error:

Uncaught Jcupitt\Vips\Exception: Unable to find library 'libvips.so.42' in any of ['/usr/local/lib64/', '/usr/local/lib/']. Make sure that you've installed libvips and that 'libvips.so.42' is on your system's library search path. in /var/www/html/vendor/jcupitt/vips/src/FFI.php:261

My php info output:

vips property value
Vips headers version 8.13.3
Vips library version 8.13.3
Vips ABI version 57.3.15

What's not happening here?

Could this be related to #178

My apologies - my apache FFI ini settings had FFI to "preloaded" and not "enabled" which prevented the library from loading.

I would suggest changing FFI.php line 256 from:

Utils::debugLog("init", ["msg" => "library load failed", "exception" => $e]);

to:

Utils::debugLog("init", ["msg" => "library load failed", "exception" => $e->getMessage()]);

It currently returns an empty exemption object instead of the error message.

Ooop! Good idea, thanks.

... I put in your fix and credited you in the CHANGELOG, I hope that's OK.

Been working perfectly since I updated the FFI settings. Thank you!