0

I am trying to install TensorRT before installing TensorFlow 1.8 from source. When I follow the documentation given here, I run into an error when installing TensorRT 4.0. The error I get is:

nivedithak@nivii-Sum18:~/Downloads$ sudo apt-get install tensorrt
[sudo] password for nivedithak: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 tensorrt : Depends: libnvinfer4 (>= 4.1.2) but it is not going to be installed
            Depends: libnvinfer-dev (>= 4.1.2) but it is not going to be installed
            Depends: libnvinfer-samples (>= 4.1.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

When I use

nivedithak@nivii-Sum18:~/Downloads$ apt-mark showhold

I don't see any packages. I am not sure how to get ahead. I am using CUDA 9.0 with cuDNN 7.0.5.

  • 1
    You could try installing the packages that tensorrt depends on. sudo apt-get install --dry-run tensorrt libnvinfer4 libnvinfer-dev libnvinfer-samples Remove --dry-run to do it For Real. – waltinator Jun 26 '18 at 20:15
  • It results in: The following packages have unmet dependencies: libnvinfer4 : Depends: cuda-cublas-9-0 but it is not installable E: Unable to correct problems, you have held broken packages. I did install the CUDA 9.0 from the deb file. I am unsure why it is missing dependencies – Nivii1406 Jun 26 '18 at 20:52
  • Maybe try installing CUDA for 16.04 this way first: askubuntu.com/a/1025949/231142 which does install the missing dependencies of cuda-cublas that you are showing. – Terrance Jun 27 '18 at 13:39
0

I had the same issue.

Environment

  • ubuntu 16.04
  • cuda 9.0

Solution:

I think that you may install the cuda by .run file. If that's true, u should remove it and reinstall cuda by .deb file.

run

dpkg-query -W | grep cuda-cublas

then if outputs is something like this :

cuda-cublas-9-0 9.0.176-1
cuda-cublas-dev-9-0 9.0.176-1

then your issue will be solved.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.