Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: NvInfer.h: No such file or directory #14

Closed
z393 opened this issue May 4, 2020 · 6 comments
Closed

fatal error: NvInfer.h: No such file or directory #14

z393 opened this issue May 4, 2020 · 6 comments

Comments

@z393
Copy link

z393 commented May 4, 2020

fatal error: NvInfer.h: No such file or directory
#include "NvInfer.h"
^~~~~~~~~~~
compilation terminated.
CMake Error at myplugins_generated_mish.cu.o.Debug.cmake:219 (message):
Error generating
/media/tensorrtx/yolov4/build/CMakeFiles/myplugins.dir//./myplugins_generated_mish.cu.o

CMakeFiles/myplugins.dir/build.make:70: recipe for target 'CMakeFiles/myplugins.dir/myplugins_generated_mish.cu.o' failed
make[2]: *** [CMakeFiles/myplugins.dir/myplugins_generated_mish.cu.o] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/myplugins.dir/all' failed
make[1]: *** [CMakeFiles/myplugins.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

@wang-xinyu
Copy link
Owner

Do you have tensorrt installed on your machine? NvInfer.h is in package libnvinfer-dev

user@user-SYS-7048GR:~$ dpkg -L libnvinfer-dev 
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libnvinfer_static.a
/usr/lib/x86_64-linux-gnu/libmyelin_compiler_static.a
/usr/lib/x86_64-linux-gnu/libmyelin_executor_static.a
/usr/lib/x86_64-linux-gnu/libmyelin_pattern_library_static.a
/usr/lib/x86_64-linux-gnu/libmyelin_pattern_runtime_static.a
/usr/include
/usr/include/x86_64-linux-gnu
/usr/include/x86_64-linux-gnu/NvInfer.h
/usr/include/x86_64-linux-gnu/NvInferRuntime.h
/usr/include/x86_64-linux-gnu/NvInferRuntimeCommon.h
/usr/include/x86_64-linux-gnu/NvInferVersion.h
/usr/include/x86_64-linux-gnu/NvUtils.h
/usr/share
/usr/share/doc
/usr/share/doc/libnvinfer-dev
/usr/share/doc/libnvinfer-dev/copyright
/usr/share/doc/libnvinfer-dev/changelog.Debian
/usr/lib/x86_64-linux-gnu/libmyelin.so
/usr/lib/x86_64-linux-gnu/libnvinfer.so

@wangtianlong1994
Copy link

@wang-xinyu

After I installed tensorrt, the same error still occurred

My version of tensorrt is 5.1.5.0

When I input dpkg - L libnvinfer dev

Indicates that libnvinfer dev is not installed

Thank you for your help

@wang-xinyu
Copy link
Owner

@wangtianlong1994 It's libnvinfer-dev.

@z393 z393 closed this as completed Jul 14, 2020
@Gavin-zsr
Copy link

Do you have tensorrt installed on your machine? NvInfer.h is in package libnvinfer-dev

user@user-SYS-7048GR:~$ dpkg -L libnvinfer-dev 
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libnvinfer_static.a
/usr/lib/x86_64-linux-gnu/libmyelin_compiler_static.a
/usr/lib/x86_64-linux-gnu/libmyelin_executor_static.a
/usr/lib/x86_64-linux-gnu/libmyelin_pattern_library_static.a
/usr/lib/x86_64-linux-gnu/libmyelin_pattern_runtime_static.a
/usr/include
/usr/include/x86_64-linux-gnu
/usr/include/x86_64-linux-gnu/NvInfer.h
/usr/include/x86_64-linux-gnu/NvInferRuntime.h
/usr/include/x86_64-linux-gnu/NvInferRuntimeCommon.h
/usr/include/x86_64-linux-gnu/NvInferVersion.h
/usr/include/x86_64-linux-gnu/NvUtils.h
/usr/share
/usr/share/doc
/usr/share/doc/libnvinfer-dev
/usr/share/doc/libnvinfer-dev/copyright
/usr/share/doc/libnvinfer-dev/changelog.Debian
/usr/lib/x86_64-linux-gnu/libmyelin.so
/usr/lib/x86_64-linux-gnu/libnvinfer.so

我查找这个包后,显示我没有安装这个包,但是我是安装好TensorRT的,请问这种情况该怎么解决

@apple2333cream
Copy link

我也遇到这个问题了,在cmakelist文件中添加tensorRT的安装路径之后就不报错了

include_directories(/home/wzp/project/trt/TensorRT-7.0.0.11/include)
link_directories(/home/wzp/project/trt/TensorRT-7.0.0.11/lib)

Uploading image.png…

@dcdethan
Copy link

dcdethan commented May 7, 2021

我也遇到这个问题了,在cmakelist文件中添加tensorRT的安装路径之后就不报错了

include_directories(/home/wzp/project/trt/TensorRT-7.0.0.11/include)
link_directories(/home/wzp/project/trt/TensorRT-7.0.0.11/lib)

请问在哪个文件内,如何添加呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants