# Error: CUDA cannot be installed on this device

**URL:** <https://forums.developer.nvidia.com/t/error-cuda-cannot-be-installed-on-this-device/59935>\
**Category:** Jetson TX2\
**Created:** [April 7, 2018, 2:53pm UTC](https://forums.developer.nvidia.com/t/error-cuda-cannot-be-installed-on-this-device/59935 "2018-04-07T14:53:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Newbie88](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Newbie88](https://forums.developer.nvidia.com/u/Newbie88)\
**Post date:** [April 7, 2018, 2:53pm UTC](https://forums.developer.nvidia.com/t/error-cuda-cannot-be-installed-on-this-device/59935/1 "2018-04-07T14:53:20Z")

</div>

I am new to this whole area so please excuse my ignorance,

I am trying to install Jetpack 3.2 on a TX2, I’m running Ubuntu 16.04. The host installation seems to go ok however I am stuck repeatedly at the following point when trying to do the target install.

"The public CUDA GPG key does not appear to be installed  
To install run this command:  
sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub

Error: CUDA cannot be installed on this device. This may be caused by another apt-get command running on device when installing CUDA. Please use apt-get command to make sure the 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 run the following command:  
sudo apt-key add /var/cuda-repo-9-0-local/7fa2af80.pub  
and receive an “ok” response

I then proceed to check the packages  
sudo apt-get install X  
where X = cuda-toolkit-9-0, libgomp1, libfreeimage-dev, libopenmpi-dev, openmpi-bin  
and receive the response that X is already the newest version  
“0 upgraded, 0 newly installed, 0 to remove and 54 not upgraded”

I press Enter as stipulated in the message above - nothing happens, the installation wizard does not progress and the TX2 appears to be stuck in forced recovery mode.

Any help appreciated.

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [April 8, 2018, 12:49am UTC](https://forums.developer.nvidia.com/t/error-cuda-cannot-be-installed-on-this-device/59935/2 "2018-04-08T00:49:52Z")

</div>

Sometimes you might find Ubuntu is set for package update (or check of update requirements) right when you are trying to install packages, but it may also get stuck somewhere in the process. After a fresh reboot is your host able to:

```auto
sudo apt update

```

Also, does this host have an NVIDIA video card?

---

<div class="post-metadata">

**Author:** ![Newbie88](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Newbie88](https://forums.developer.nvidia.com/u/Newbie88)\
**Post date:** [April 9, 2018, 7:31am UTC](https://forums.developer.nvidia.com/t/error-cuda-cannot-be-installed-on-this-device/59935/3 "2018-04-09T07:31:24Z")

</div>

Thanks linuxdev for your reply,

I have run the sudo apt update as you suggested. And yes the host is running an Nvidia gpu. It should be noted that the install gets stuck at exactly the same point every time.

In hindsight I believe the issue to be related to the configuration of my ethernet network. I know practically nothing about network configuration, perhaps you might point me in the direction of some information, as dumbed down as possible! I have looked online however much of this appears to be quite involved.

In my set-up, my internet connection is routed via the host as per option 2) in the Nvidia installation wizard. Which from what I can ascertain this means playing with dhcp and assigning static addresses. I’m swimming in the deep end here!

---

<div class="post-metadata">

**Author:** ![WayneWWW](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/waynewww/32/14043_2.png) [@WayneWWW](https://forums.developer.nvidia.com/u/WayneWWW)\
**Post date:** [April 9, 2018, 9:13am UTC](https://forums.developer.nvidia.com/t/error-cuda-cannot-be-installed-on-this-device/59935/4 "2018-04-09T09:13:13Z")

</div>

I believe your issue can be resolved through below method

> **[Quick Start Guide :: CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html#ubuntu-x86_64)**
>
> Minimal first-steps instructions to get CUDA running on a standard system.

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [April 9, 2018, 10:09pm UTC](https://forums.developer.nvidia.com/t/error-cuda-cannot-be-installed-on-this-device/59935/5 "2018-04-09T22:09:15Z")

</div>

Just some notes in case they help…

Normally a Jetson gets its address from a router via the DHCP protocol. Your host can be a router as well. Either way the PC or router appliance should have a log showing an address was requested as the Jetson boots if DHCP ran its query…and the logs should show what address was handed out or assigned.

After flashing a Jetson with JetPack there is a bit of a custom script which would cause the Jetson to announce its address to JetPack…if this fails you can still enter the address by hand. If the initial reboot of the Jetson did not convey this information to JetPack, then you would be required to manually enter this address. There may be a request for this on the command console portion of JetPack…you might need to click on that tab to see it.

Do be aware that the custom script does not work with WiFi…the Jetson must use wired for this to succeed. It is ok for the host to have WiFi to the internet, but use wired during extra package installs between Jetson and host.

The mechanism for setting up the host PC as a DHCP server (a router) involves settings specific to Ubuntu…so something like Fedora can’t be used with any automated setup…some newer versions of Ubuntu (anything newer than 16.04) also can’t be used (at least not reliably…one would have to trick JetPack into thinking it is on an earlier release just to get it to install to something newer).

Sometimes ssh is also involved. If ssh wants to prompt for a password in a GUI environment you’ll need package “ssh-askpass” installed on the host:

```auto
sudo apt-get install ssh-askpass

```

If ssh wants a password and is asking on the command line, then you’d need to make sure the tab showing command line in JetPack is selected. Mostly you won’t get prompted for this under JetPack, but there are cases where this can be requested (such as re-installing might or might not change something which ssh wants to verify).

---

<div class="post-metadata">

**Author:** ![Newbie88](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Newbie88](https://forums.developer.nvidia.com/u/Newbie88)\
**Post date:** [June 11, 2018, 7:29pm UTC](https://forums.developer.nvidia.com/t/error-cuda-cannot-be-installed-on-this-device/59935/6 "2018-06-11T19:29:00Z")

</div>

Thanks to All for your responses. That the custom script does not work with WiFi seems to have been the issue, using a wired connection the installation completed.

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 6:29pm UTC](https://forums.developer.nvidia.com/t/error-cuda-cannot-be-installed-on-this-device/59935/7 "2021-10-18T18:29:17Z")

</div>


