我正在 Linux 中的 slurm 集群上安装 pytorch。由于我没有 sudo
授权,我必须从源代码安装所有内容。
我使用以下代码进行 PyTorch 安装:
$ git clone https://github.com/torch/distro.git ~/torch --recursive
$ sed -i 's/-pPR/-PR/' ~/torch/exe/luajit-rocks/luarocks/src/luarocks/fs/unix/tools.lua
$ cd ~/torch; ./install.sh
当我运行 cd ~/torch; ./install.sh
命令时,出现以下错误:
Installing Lua version: LUAJIT21
./install.sh: line 73: cmake: command not found
所以我的工作变成了安装 cmake
。我关注了this post:
$ wget http://www.cmake.org/files/v2.8/cmake-2.8.3.tar.gz
$ tar xzf cmake-2.8.3.tar.gz
$ cd cmake-2.8.3
$ ./configure --help
$ ./configure --prefix=/opt/cmake
当我运行最后一行时,我得到:
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
CMake Error at Utilities/cmcurl/CMakeLists.txt:511 (message):
Could not find OpenSSL. Install an OpenSSL development package or
configure CMake with -DCMAKE_USE_OPENSSL=OFF to build without OpenSSL.
虽然我安装了 OpenSSL 并且有 OpenSSL has been successfully configured
,但还是发生了相同的 Could NOT find OpenSSL
。如果我有 sudo
授权,一切都会很容易,但我想知道如何在没有它的情况下进行安装。