lua言語のinstallが完了したので、次は、torch.
Torch | Getting started with Torch や Torch7 のインストール - のんびりしているエンジニアの日記 を 参考に(というより、そのまま)実行。
途中で、libreadline.so.8 を見つけられないエラーとなった為、 「export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib」を行い、再実行。
$ git clone https://github.com/torch/distro.git ~/torch --recursive $ cd ~/torch; bash install-deps; $ ./install.sh : CMAKE_REQUIRED_LIBRARIES is set to: /usr/lib64/libdl.so For compatibility with CMake 3.11 and below this check is ignoring it. Call Stack (most recent call first): /usr/local/share/cmake-3.15/Modules/FindThreads.cmake:128 (CHECK_INCLUDE_FILE) exe/luajit-rocks/luajit-2.1/CMakeLists.txt:174 (FIND_PACKAGE) This warning is for project developers. Use -Wno-dev to suppress it. which: no nvcc in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/end0tknr/.local/bin:/home/end0tknr/bin) /home/end0tknr/tmp/torch/install/bin/luajit: error while loading shared libraries: libreadline.so.8: cannot open shared object file: No such file or directory Installing common Lua packages /home/end0tknr/tmp/torch/install/bin/luajit: error while loading shared libraries: libreadline.so.8: cannot open shared object file: No such file or directory $ : $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib $ ./install.sh : Do you want to automatically prepend the Torch install location to PATH and LD_LIBRARY_PATH in your /home/end0tknr/.bashrc? (yes/no) [yes] >>> yes $
何やら、.bashrc に書き込まれたらしので、内容を確認すると、 torch-activate を呼び出し、その中で、環境変数を登録するようになっていました。
$ cat ~/.bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # Uncomment the following line if you don't like systemctl's auto-paging feature: # export SYSTEMD_PAGER= # User specific aliases and functions . /home/end0tknr/tmp/torch/install/bin/torch-activate $ cat ~/torch/install/bin/torch-activate export LUA_PATH='/home/end0tknr/.luarocks/share/lua/5.1/?.lua;/home/end0tknr/.luarocks/share/lua/5.1/?/init.lua;/home/end0tknr/tmp/torch/install/share/lua/5.1/?.lua;/home/end0tknr/tmp/torch/install/share/lua/5.1/?/init.lua;./?.lua;/home/end0tknr/tmp/torch/install/share/luajit-2.1.0-beta1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua' export LUA_CPATH='/home/end0tknr/.luarocks/lib/lua/5.1/?.so;/home/end0tknr/tmp/torch/install/lib/lua/5.1/?.so;./?.so;/usr/local/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so' export PATH=/home/end0tknr/tmp/torch/install/bin:$PATH export LD_LIBRARY_PATH=/home/end0tknr/tmp/torch/install/lib:$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=/home/end0tknr/tmp/torch/install/lib:$DYLD_LIBRARY_PATH export LUA_CPATH='/home/end0tknr/tmp/torch/install/lib/?.so;'$LUA_CPATH