在 Yosemite 上安装 cunn for torch 失败并出现错误的对象错误。
-- Install configuration: "Release"
-- Installing: /usr/local/lib/luarocks/rocks/cunn/scm-1/lib/libcunn.so
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: object: /usr/local/lib/luarocks/rocks/cunn/scm-1/lib/libcunn.so malformed object (load command 23 cmdsize is zero)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: object: /usr/local/lib/luarocks/rocks/cunn/scm-1/lib/libcunn.so malformed object (load command 23 cmdsize is zero)
-- Installing: /usr/local/lib/luarocks/rocks/cunn/scm-1/lua/cunn/init.lua
-- Installing: /usr/local/lib/luarocks/rocks/cunn/scm-1/lua/cunn/test.lua
Updating manifest for /usr/local/lib/luarocks/rocks
cunn scm-1 is now built and installed in /usr/local/ (license: BSD)
在线搜索显示这与库损坏或 install_name_tool 的更新有关。我将 XCode(6.1) 中的 install_name_tool 替换为 /usr/bin ,但仍然出现同样的错误。下面是一些诊断
$ ls -l $(which install_name_tool)
-rwxr-xr-x 1 root admin 14192 Nov 8 11:25 /opt/local/bin/install_name_tool
$ otool -L /usr/bin/install_name_tool
/usr/bin/install_name_tool:
/usr/lib/libxcselect.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
$ pkgutil --file-info /usr/bin/install_name_tool
volume: /
path: /usr/bin/install_name_tool
pkgid: com.apple.pkg.Essentials
pkg-version: 10.10.0.1.1.1412852630
install-time: 1413599255
uid: 0
gid: 0
mode: 755
我需要这个才能工作,以便我可以将 CUDA 与 Torch 一起使用,我已经花了几个小时在上面,请帮忙。