安装 Torch7 时,发生致命错误:errno.h:没有那个文件或目录

按照http://torch.ch/docs/getting-started.html的步骤安装Torch。

操作系统版本:Mac ox Sierra 10.12

在git clone后,进入~/torch目录并运行bash install-deps;

然而却出现了以下错误:

./install.sh Prefix set to /Users/torch/install

正在安装Lua版本: LUAJIT21

正在安装常用的Lua包

env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/Users/torch/install/include -c src/lfs.c -o src/lfs.o

src/lfs.c:36:19: fatal error: errno.h: 没有那个文件或目录

#include ^ 编译终止。

错误:构建错误:编译src/lfs.o文件失败

在谷歌搜索后,没有找到正确的解决方案。您有什么提示吗?谢谢!

点赞
用户1180020
用户1180020

xcode-select --install 解决了这个问题。

2016-10-28 21:32:19