How can I force 16.04 to add a repository even if it isn't considered secure enough?
Solution 1:
I had the same problem trying to install CUDA 7.5 in Ubuntu 16.04. This is due to a missing SHA256 or SHA512 entry in the CUDA package (as reported by Debian team here).
It seems that we can't force apt-get update to fetch a "non secure repository", but I could avoid completely the problem by using the .run file. Here's what I did step by step:
- Instead of downloading the .deb package, download the .run file (from this page)
-
Install a compatible compiler (it seems that cuda 7.5 is not compatible with the default compiler of Ubuntu 16.04):
sudo apt-get install gcc-4.9 g++-4.9
-
You may need to install some additional packages (depends on your configuration):
sudo apt-get install nvidia-modprobe freeglut3-dev libx11-dev libxmu-dev libxi-dev libglu1-mesa-dev
-
Launch the run file and follow the instructions:
sudo sh cuda_7.5.18_linux.run
This worked well for me (don't forget to install the NVIDIA driver)
EDIT: After step 2 & 3, if CUDA installer tries to use gcc 5.3.1 (default for ubuntu 16.04) as compiler instead of 4.9 version, you can try to remove the 5.3.1 version, install CUDA, then reinstall the latest gcc version.
Solution 2:
Change your /var/cuda-repo-7-5-local/Release
to the following:
Origin: NVIDIA
Label: NVIDIA CUDA
Architecture: repogenstagetemp
MD5Sum:
51483bc34577facd49f0fbc8c396aea0 75379 Packages
4ef963dfa4276be01db8e7bf7d8a4f12 21448 Packages.gz
SHA256:
532b1bb3b392b9083de4445dab2639b36865d7df1f610aeef8961a3c6f304d8a 75379 Packages
2e48cc13b6cc5856c9c6f628c6fe8088ef62ed664e9e0046fc72819269f7432c 21448 Packages.gz
Run sudo apt-get update
ignoring warnings about invalid signatures, and you're done.
If that failed, replace the SHA256 sum with the output of
sha256sum /var/cuda-repo-7-5-local/Packages.gz
and
gunzip -c /var/cuda-repo-7-5-local/Packages.gz | sha256sum
Solution 3:
Currently you can use the following commands on Ubuntu 16.04 to install CUDA Toolkit 7.5:
sudo apt install nvidia-cuda-toolkit