Softwares' installations

在服务器的个人账户下上安装cuda

  1. cuda archive里找到对应的cuda版本的runfile文件,通过sh xxx.run来安装

  2. 安装的时候,需要去Options里更改toolkit和library的path,设置完后即可进行install

  3. install完了之后,需要去bashrc里添加以下内容:

1
2
export PATH="/xxx/cuda/bin:$PATH"
export LD_LIBRARY_PATH="/xxx/cuda/lib64:$LD_LIBRARY_PATH"
  1. 然后source一下bashrc,再nvcc -V,如果显示版本号,则说明安装成功

  2. 遇到需要本地cuda的时候,可以

export CUDA_HOME=="/xxx/cuda/"

在服务器个人账户下安装GCC

  1. 去清华源下载需要的gcc的版本,网址在这里: https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/

  2. 解压完后,进入文件夹gcc-x.x.x,执行命令:./contrib/download_prerequisites

  3. make build,新建一个文件夹,cd build../configure --prefix=/home/xxx/gcc-x.x.0 --enable-shared --enable-threads=posix --enable-languages=c,c++,fortran --disable-multilib

  4. make -j10 && make install

  5. 打开 .bashrc,添加一下内容:

1
2
3
export PATH=/path/to/install/gcc-5.4/bin:$PATH
export LD_LIBRARY_PATH=/path/to/install/gcc-5.4/lib/:/path/to/install/gcc-5.4/lib64:$LD_LIBRARY_PATH`

  1. source一下bashrc,然后gcc --version,如果显示版本号,则说明安装成功

参考链接

  • https://blog.csdn.net/qq_35082030/article/details/110387800
  • https://blog.csdn.net/sdbyp/article/details/139853774
  • https://blog.csdn.net/Sihang_Xie/article/details/127347139

非root环境下安装gcc - https://blog.csdn.net/Fhujinwu/article/details/113786909 - https://blog.csdn.net/qq_33278461/article/details/106357783?spm=1001.2014.3001.5502 - https://blog.csdn.net/qq_38308388/article/details/127574517 - https://www.cnblogs.com/TonyYPZhang/p/17614809.html