首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装Torch时,Torch '!./install.sh‘在Colab中返回错误

安装Torch时,Torch '!./install.sh‘在Colab中返回错误
EN

Stack Overflow用户
提问于 2018-12-21 08:40:10
回答 1查看 331关注 0票数 0

我跟随http://torch.ch/docs/getting-started.html#_安装了Torch。在运行时,我总是得到以下错误

代码语言:javascript
复制
!./install.sh

在google colab中

错误:

代码语言:javascript
复制
...
-- Installing: /root/torch/install/include/luaT.h
-- Installing: /root/torch/install/share/cmake/torch/luaTConfig.cmake
Updating manifest for /root/torch/install/lib/luarocks/rocks
torch scm-1 is now built and installed in /root/torch/install/ (license: BSD)

Updating manifest for /root/torch/install/lib/luarocks/rocks
dok scm-1 is now built and installed in /root/torch/install/ (license: BSD)

gcc -O2 -fPIC -I/root/torch/install/include -c utils.c -o utils.o
gcc -shared -o treplutils.so -L/root/torch/install/lib utils.o
gcc -O2 -fPIC -I/root/torch/install/include -c readline.c -o readline.o
readline.c:8:10: fatal error: readline/readline.h: No such file or directory
 #include <readline/readline.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Error: Build error: Failed compiling object readline.o

。请帮助我修复这个错误。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-12-22 05:27:24

你可能需要像这样的东西

代码语言:javascript
复制
!apt-get install libreadline-dev

在尝试运行install.sh脚本之前。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53877856

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档