安装 Torch 时 Colab 中的 Torch '!./install.sh' returns 错误

Torch '!./install.sh' returns error in Colab when installing Torch

我按照 http://torch.ch/docs/getting-started.html#_ 安装了 Torch。 当 运行

时,我总是会收到以下错误
!./install.sh

在 google 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

。 请帮助我解决此错误。

可能你需要这样的东西

!apt-get install libreadline-dev

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