最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

macos - How to work with Vips and Lua installed via ASDF on Mac OS? - Stack Overflow

programmeradmin1浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论