更新时间:2023-10-17 10:49:04
NVCC或nvlink在名为LIBRARIES
的环境变量中查找路径.但是-在执行此操作之前,将执行外壳脚本/etc/nvcc.profile
(至少在Devuan上).
NVCC, or perhaps nvlink, looks for paths in an environment variable named LIBRARIES
. But - before doing so, the shell script /etc/nvcc.profile
is executed (at least, it is on Devuan).
在Devuan 3.0上,该文件的一行显示为:
On Devuan 3.0, that file has a line saying:
LIBRARIES =+ $(_SPACE_) -L/usr/lib/x86_64-linux-gnu/stubs
,因此默认情况下,这就是您的NVCC查找的位置.
so that's where your NVCC looks to by default.
因此,您可以执行以下两项操作之一:
You can therefore do one of two things:
在NVCC外部设置环境变量,例如在您的~/.profile
或~/.bashrc
文件中:
export LIBRARIES=-L/usr/lib/x86_64-linux-gnu/stubs
将nvcc.profile
行更改为:
Change that nvcc.profile
line to say:
LIBRARIES =+ $(_SPACE_) -L/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu/stubs
NVCC将成功构建您的二进制文件.
and NVCC will successfully build your binary.