Compilation Can';t编译darknet-YOLO-an GPU:can';找不到-lcuda
我想用GPU支持编译darknet。为此,我在生成文件中更改了以下设置:Compilation Can';t编译darknet-YOLO-an GPU:can';找不到-lcuda,compilation,nvidia,yolo,darknet,Compilation,Nvidia,Yolo,Darknet,我想用GPU支持编译darknet。为此,我在生成文件中更改了以下设置: GPU=1 CUDNN=1 CUDNN_HALF=0 OPENCV=1 AVX=0 OPENMP=0 LIBSO=0 ZED_CAMERA=0 我安装了CUDA 10(也尝试了10.1个-没有成功)和英伟达司机。以下是nvidia-smi的输出: +-----------------------------------------------------------------------------+ | NVIDIA
GPU=1
CUDNN=1
CUDNN_HALF=0
OPENCV=1
AVX=0
OPENMP=0
LIBSO=0
ZED_CAMERA=0
<>我安装了CUDA 10(也尝试了10.1个-没有成功)和英伟达司机。以下是nvidia-smi的输出:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.01 Driver Version: 418.87.01 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 208... On | 00000000:01:00.0 Off | N/A |
| 30% 26C P8 11W / 250W | 438MiB / 10989MiB | 4% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1223 G /usr/lib/xorg/Xorg 307MiB |
| 0 1501 G /usr/bin/gnome-shell 129MiB |
+-----------------------------------------------------------------------------+
和nvcc-V:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
我可以运行有关如何从nvidia安装cuda和cuDNN的文档中所述的示例,但当我编译darknet时,会出现以下错误:
/network_kernels.o obj/avgpool_layer_kernels.o -o darknet -lm -pthread `pkg-config --libs opencv` -L/usr/local/cuda/lib64 -lcuda -lcudart -lcublas -lcurand -L/usr/local/cudnn/lib64 -lcudnn -lstdc++
/usr/bin/ld: -lcuda kann nicht gefunden werden
collect2: error: ld returned 1 exit status
Makefile:143: recipe for target 'darknet' failed
make: *** [darknet] Error 1
因此,找不到
-lcuda
。我现在真的很绝望,感谢你的回答。找到libcuda的安装位置并将该路径添加到构建中的库搜索路径非常感谢你的回答。我发现,libcuda.so.1在这里:/usr/lib/x86_64-linux-gnu,libcuda.so在这里:/usr/local/cuda/lib64/stubs,正如您所提到的,我将它添加到Makefile中,它成功了!!!非常感谢你!那救了我一天!找到libcuda的安装位置并将该路径添加到构建中的库搜索路径非常感谢您的回答。我发现,libcuda.so.1在这里:/usr/lib/x86_64-linux-gnu,libcuda.so在这里:/usr/local/cuda/lib64/stubs,正如您所提到的,我将它添加到Makefile中,它成功了!!!非常感谢你!那救了我一天!