I'm trying to work with the vips
library for image processing on Mac OS (Sequoia 15.3) on Lua via the luarocks package lua-vips
and the HomeBrew package vips
.
brew install lua luarocks vips
luarocks install --local lua-vips
Example for simple scripts:
local vips = require 'vips';
local version = table.concat({ vip.version.major, vip.version.minor, vips.version.micro }, '.');
print('vips version:', version);
But get an error:
could not load library vips
stack traceback:
[C]: in function 'ffi.load'
./lua_modules/share/lua/5.4/vips.lua:5: in main chunk
[C]: in function 'require'
main.lua:1: in main chunk
[C]: in ?
And my solution was - define env variable to search .dylib
files:
export DYLD_LIBRARY_PATH="/usr/local/lib:$DYLD_LIBRARY_PATH"
But when i switched from brew version of lua to asdf version manager, this env varible doesn't work anymore. I think reason is System Integrity Protection (SIP).
How to solve this issue?