问题
在tiny-cuda-nn/binds/torch
下安装python setup.py install
出现如下错误:
/home/ipad_gan/anaconda3/envs/nerfstudio/compiler_compat/ld: cannot find -lcuda: No such file or directory
collect2: error: ld returned 1 exit status
error: command '/usr/bin/g++' failed with exit code 1
问题分析
大概率是cuda的lib64没有添加到环境变量中,导致无法找到-lcuda
解决方法
将下面这一行代码加到你的.bashrc或.zshrc中,并刷新下环境即可解决(注意修改你的cuda路径为你安装的路径)
export LIBRARY_PATH="/usr/local/cuda/lib64/stubs:$LIBRARY_PATH"