所以,我在OSX上运行火炬(参见下面的粗体错误):
______ __ | Torch7
/_ __/__ ________/ / | Scientific computing for Lua.
/ / / _ \/ __/ __/ _ \ |
/_/ \___/_/ \__/_//_/ | https://github.com/torch
| http://torch.ch
th> package.cpath = package.cpath .. ";/usr/local/Cellar/jpeg/8d/lib/?.dylib"
[0.0000s]
th> require 'image'
true
[0.0120s]
th> image.lena();
/Users/<user>/torch/install/share/lua/5.1/trepl/init.lua:319: error loading module 'libjpeg' from file '/usr/local/Cellar/jpeg/8d/lib/libjpeg.dylib':
dlsym(0x7fd564000320, luaopen_libjpeg): symbol not found
warning: <libjpeg> could not be loaded (is it installed?)
[0.0229s]
th>
特别是这一行: 错误加载模块&#39; libjpeg&#39;来自档案&#39; /usr/local/Cellar/jpeg/8d/lib/libjpeg.dylib': dlsym(0x7fd564000320,luaopen_libjpeg):找不到符号 警告:无法加载(是否已安装?)
好像我没有合适的dylib?如果是这样,我从哪里得到它?
答案 0 :(得分:0)
当您的计算机上安装了两个libjpeg时会发生这种情况,而另一个则与另一个发生冲突。 像这样开始火炬:
export DYLD_LIBRARY_PATH = / usr / local / lib:$ DYLD_LIBRARY_PATH
个
它应该有用。