4

阿木币

0

精华

5 小时

在线时间

应届白菜

Rank: 1

发表于 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


gnome-shell-screenshot-RZ6DY2.png

扫一扫浏览分享
回复

使用道具 举报

4

阿木币

0

精华

11 小时

在线时间

技术大V

Rank: 4

发表于 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。
  1. export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/TensorRT/lib:$LD_LIBRARY_PATH
复制代码
回复 点赞

使用道具 举报

4

阿木币

0

精华

5 小时

在线时间

应届白菜

Rank: 1

 楼主| 发表于 3 天前
本帖最后由 zz1122 于 2024-12-24 17:23 编辑
amov_daniel 发表于 2024-12-13 10:57
你好!

这个错误信息表明链接器(ld)在尝试构建一个程序时无法找到cudart库或nvinfer库的链接版本。cudar ...

正确安装了cuda 可是依旧无法找到cudart

                               
登录/注册后可看大图
bug1.png
gnome-shell-screenshot-TT5FZ2.png
cudart.png
回复 点赞

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表