|
发表于 2024-12-12 18:51:46
222 浏览 2 回复
安装SDK时出现错误,提示找不到 -lcudart -lnvinfer
System:x86_64
-- PLATFORM: X86_CUDA
-- CUDA: ON
-- WITH_FFMPEG: ON
-- OpenCV library status:
-- version: 4.7.0
-- libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio;opencv_alphamat;opencv_aruco;opencv_barcode;opencv_bgsegm;opencv_bioinspired;opencv_ccalib;opencv_datasets;opencv_dnn_objdetect;opencv_dnn_superres;opencv_dpm;opencv_face;opencv_freetype;opencv_fuzzy;opencv_hdf;opencv_hfs;opencv_img_hash;opencv_intensity_transform;opencv_line_descriptor;opencv_mcc;opencv_optflow;opencv_phase_unwrapping;opencv_plot;opencv_quality;opencv_rapid;opencv_reg;opencv_rgbd;opencv_saliency;opencv_shape;opencv_stereo;opencv_structured_light;opencv_superres;opencv_surface_matching;opencv_text;opencv_tracking;opencv_videostab;opencv_viz;opencv_wechat_qrcode;opencv_xfeatures2d;opencv_ximgproc;opencv_xobjdetect;opencv_xphoto
-- include path: /usr/local/include/opencv4
-- CMAKE_INSTALL_PREFIX: /usr/local
-- SV_INSTALL_PREFIX: /usr/local
-- Configuring done
-- Generating done
-- Build files have been written to: /home/oy/SpireCV/build
[ 2%] Built target CreateMarker
[ 19%] Built target sv_gimbal
[ 20%] Linking CXX shared library libsv_yoloplugins.so
/usr/bin/ld: 找不到 -lcudart
/usr/bin/ld: 找不到 -lnvinfer
/usr/bin/ld: 找不到 -lcudart
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/sv_yoloplugins.dir/build.make:357:libsv_yoloplugins.so] 错误 1
make[1]: *** [CMakeFiles/Makefile2:450:CMakeFiles/sv_yoloplugins.dir/all] 错误 2
make: *** [Makefile:130:all] 错误 2
|
-
扫一扫浏览分享
|
|
|
|
|
|
|
发表于 2024-12-13 10:57:50
你好!
这个错误信息表明链接器(ld)在尝试构建一个程序时无法找到cudart库或nvinfer库的链接版本。cudart是NVIDIA CUDA运行时库,而nvinfer是NVIDIA TensorRT的核心库。
解决方法:
1. 确认CUDA和TensorRT已经正确安装在系统上。
2.确认环境变量如LD_LIBRARY_PATH包含了库文件的路径。例如,如果cudart和nvinfer安装在/usr/local/cuda/lib64和/usr/local/TensorRT/lib,则需要添加这些路径到LD_LIBRARY_PATH。
- export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/TensorRT/lib:$LD_LIBRARY_PATH
复制代码 |
|
|
|
|
|
|
|
本帖最后由 zz1122 于 2024-12-24 17:23 编辑
正确安装了cuda 可是依旧无法找到cudart |
|
|
|
|
|
|
|