Tensorflow looking for libnvinfer.so.7 when I have libnvinfer.so.8 installed

The following is installed on a Jetson Xavier NX:

  • JetPack 4.6-b199
  • CUDA 10.2
  • CUDNN 8.2.1
  • Tensorflow 2.4.0
  • TensorRT

Running Tensorflow code results in the following error:

2022-01-09 19:56:27.887280: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory
2022-01-09 19:56:27.887423: F tensorflow/compiler/tf2tensorrt/stub/nvinfer_stub.cc:49] getInferLibVersion symbol not found.
Aborted (core dumped)

There is /usr/lib/aarch64-linux-gpu/libnvinfer.so.8 but no libnvinfer.so.7 in the system.

How do I know which components are causing the incompatibilities and how do I fix them? Appreciate more specifics than “upgrade your installs” because I have 1) tried searching the forums for relevant posts, 2) tried upgrading components and libraries, all to no avail.


Have you fixed this issue already.
Please note that you will need to install the package that compiled with the same software for the compatibility.


Hi @AastaLLL,

Yes, turns out the system got a recent system update that updated CUDA and TensorRT libraries to use libnvinfer.so.8, rendering the existing Tensorflow 2.4 unuseable as it was looking for libnvinfer.so.7.
Upgrading the Tensorflow from 2.4.x to 2.5.x fixed the problem.

Maybe Nvidia could keep a easy-to-access documentation showing CUDA/TensoRT/Tensorflow versions compatibility. It would be very helpful for troubleshooting.

The solution is “easy” once I figured out what’s going on, but the difficulty is in figuring out what’s wrong, as it’s not obvious at first that the installed Tensorflow and TensorRT versions are incompatible.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.