CUDA cannot be installed on device TX2 Jetpack3.3

When refresh my TX2 I met the following errors.I have tried 3 times it always have the same problem:

Reading package lists... Done   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Connection to 192.168.1.53 closed.
dpkg-query: package 'cuda-toolkit-9-0' is not installed and no information is available
dpkg-query: package 'libfreeimage-dev' is not installed and no information is available
dpkg-query: package 'libopenmpi-dev' is not installed and no information is available
dpkg-query: package 'openmpi-bin' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
1
Error: CUDA cannot be installed on device. This may be caused by other apt-get command running on device when installing CUDA. Please use apt-get command in a terminal to make sure following packages are installed correctly on device before continuing:
cuda-toolkit-9-0 libgomp1 libfreeimage-dev libopenmpi-dev openmpi-bin
After these packages are installed on device, press Enter key to continue

I tried many times, and once it seems it stop as here(as the attachment shows).
What’s wrong about this,I have never met such problem on TX2 with Jetpack3.1.
However,there is a folder in" /home/nvidia/NVIDIA-9.0_Samples/aarch64/linux/release "and I can run the example nameed "deviceQuery"successfully.Is that mean CUDA is installed? But when I run “boxFilter” is showed “Error finding image file ‘lenaRGB.ppm’”.
How can I validate whether it fully installed or not?

First, there are repositories added where CUDA and similar NVIDIA libraries are made available to the standard “apt-get” tool. These will be a subdirectory of “/var/”. See if there is anything CUDA there. If so, then “sudo apt-get …somethingcuda…” will work.

To see what packages are actually installed (beyond the repository):

dpkg -l | egrep -i cuda

The files in your home directory are only samples…if these require a link to an installed CUDA library…and if the library is not present, then run will fail.

Not sure about the individual errors, but see first if the repo exists, and second if CUDA libraries exist. The image itself you attached indicates the repo was copied to the Jetson…it doesn’t mean it installed correctly, but this shows success up to that point.

First,the result by the command

dpkg -l | egrep -i cuda

is as following:

ii  cuda-cublas-9-0                            9.0.252-1                                     arm64        CUBLAS native runtime libraries
ii  cuda-license-9-0                           9.0.252-1                                     arm64        CUDA licenses
ii  cuda-repo-l4t-9-0-local                    9.0.252-1                                     arm64        cuda repository configuration files
ii  libcudnn7                                  7.1.5.14-1+cuda9.0                            arm64        cuDNN runtime libraries
ii  libcudnn7-dev                              7.1.5.14-1+cuda9.0                            arm64        cuDNN development libraries and headers
ii  libcudnn7-doc                              7.1.5.14-1+cuda9.0                            arm64        cuDNN documents and samples
ii  libgie-dev                                 4.1.3-1+cuda9.0                               arm64        Transitional package
ii  libnvinfer-dev                             4.1.3-1+cuda9.0                               arm64        TensorRT development libraries and headers
ii  libnvinfer-samples                         4.1.3-1+cuda9.0                               arm64        TensorRT samples and documentation
ii  libnvinfer4                                4.1.3-1+cuda9.0                               arm64        TensorRT runtime libraries
ii  tensorrt                                   4.0.2.0-1+cuda9.0                             arm64        Meta package of TensorRT

I think it does not installed fully.

Second, there is a subdirectory of “var” ,the content is list as the attachment.Do you mean I need to install every package by myself.Such as:

dpkg -i cuda-core-9-0_9.0252-1_arm64.deb

Third,

nvcc -v

output nothing but “bash:nvcc:command not found”

At last,as the previous picture shows, wthy it stop witout going on?

So the repo is installed, and you have the possibility of things being correct. There are some cases where the checksum/fingerprint/ID (not sure what to call it with a repo) has some issue and needs to be updated…someone else will probably know more about that.

Normally nvcc will not be in your default path. If you got to “/usr/local/cuda-9.0/bin/”, and then look, probably nvcc is there. You could add this to your path, or you could name nvcc via the full path. Consider that on some systems (mainly a desktop PC) it is possible to have more than one version of CUDA, and thus each has its own directory and there would be no way to have a default path to all of them. Do you have “/usr/local/cuda-9.0/bin/nvcc”?

I run as:

apt-get install cuda-9-0

and it seems successed.
“nvcc -V” result:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Sun_Nov_19_03:16:56_CST_2017
Cuda compilation tools, release 9.0, V9.0.252

I configure caffe in this environment and it was successfully compile.but when I ran my program it shows:

F0116 03:44:23.079294 17456 pooling_layer.cu:212] Check failed: error == cudaSuccess (48 vs. 0)  no kernel image is available for execution on the device

Is that has some releation wich cuda?

Besieds, if I configure a wonderful environment then how can I easily move it to another TX2 which has no system and any environment?

If I want to uninstall CUDA9.0 and install 8.0 what should I do.

I’m not really a “CUDA guy”, but did you set your compute architecture to “6.2” (sm_62)? If you set it to the wrong GPU type it won’t work, and there are a lot of cases where adapting from a desktop PC to TX2 will work with just that change. Example:

-gencode arch=comput_62,code=sm_62