GraphicsMagick lua库
https://github.com/clementfarabet/graphicsmagick
GraphicsMagick lua库安装后,lua文件中引入 require ‘graphicsmagick’ 报错
1 2 3 4 5 6 7 8 9
| .../openresty/luajit/share/lua/5.1/graphicsmagick/Image.lua:329: libGraphicsMagickWand.so: cannot open shared object file: No such file or directory stack traceback: [C]: in function 'load' .../openresty/luajit/share/lua/5.1/graphicsmagick/Image.lua:329: in main chunk [C]: in function 'require' ...l/openresty/luajit/share/lua/5.1/graphicsmagick/init.lua:2: in main chunk [C]: in function 'require' stdin:1: in main chunk [C]: at 0x004046d0
|
原因是:libGraphicsMagickWand.so 动态库未找到.
在安装graphicsmagick时,libGraphicsMagickWand.so等动态库文件被安装在
/usr/local/lib下,/usr/local/lib目录未被链接上
解决方法:
将 /usr/local/lib 目录添加到 ld.so.conf 文件中
1 2 3 4 5
| vi /etc/ld.so.conf #文件内容如下 include ld.so.conf.d/*.conf /usr/local/lib
|
保存后执行ldconfig 重新链接动态库即可