【问题标题】:Torch '!./install.sh' returns error in Colab when installing Torch安装 Torch 时,Torch '!./install.sh' 在 Colab 中返回错误
【发布时间】:2019-05-21 12:24:33
【问题描述】:

我关注http://torch.ch/docs/getting-started.html#_ 安装 Torch。 运行时总是报如下错误

!./install.sh

在谷歌 colab 中

错误:

...
-- 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

。 请帮助我解决此错误。

【问题讨论】:

    标签: torch google-colaboratory


    【解决方案1】:

    可能你需要类似的东西

    !apt-get install libreadline-dev
    

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

    【讨论】:

      猜你喜欢
      • 2019-03-01
      • 2022-01-28
      • 1970-01-01
      • 1970-01-01
      • 2017-12-06
      • 2017-06-10
      • 2016-05-17
      • 2020-07-11
      • 1970-01-01
      相关资源
      最近更新 更多