I started a NVIDIA VM on AZURE and trying to do update using
sudo apt update
but gives error:
Hit:2 http://azure.archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://azure.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 https://packages.microsoft.com/repos/azure-cli focal InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:1 http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
Reading package lists... Done
W: GPG error: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'http://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
to install the keys i used
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv A4B469963BF863CC
but that gives No data error. gpg: keyserver receive failed: No data
I can run sudo apt-get upgrade but not the update.
Any help would be appreciated
Even though there is cuda installed but it still doesnt find cuda libraries, and that could be due to update.
the following worked for me
apt-key del 7fa2af80
rm /etc/apt/sources.list.d/cuda.list
rm /etc/apt/sources.list.d/nvidia-ml.list
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb
dpkg -i cuda-keyring_1.0-1_all.deb
I ran those commands in docker container, so in VM you might need to add sudo.
The error is due to Cuda repo key rotation.
The solution posted on Nvidia forms didn't work for me https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771
The following worked:
apt-key del 7fa2af80
wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-keyring_1.0-1_all.deb
dpkg -i cuda-keyring_1.0-1_all.deb
Replace $distro/$arch in the following commands;ex:
debian10/x86_64
debian11/x86_64
ubuntu1604/x86_64
ubuntu1804/cross-linux-sbsa
ubuntu1804/ppc64el
ubuntu1804/sbsa
ubuntu1804/x86_64
ubuntu2004/cross-linux-sbsa
ubuntu2004/sbsa
ubuntu2004/x86_64
ubuntu2204/sbsa
ubuntu2204/x86_64
wsl-ubuntu/x86_64
and then
apt-get update
if you have an error as the following after the apt-get update
root#9c8cceaf7843:/# apt-get update
E: Conflicting values set for option Signed-By regarding source https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /: /usr/share/keyrings/cuda-archive-keyring.gpg !=
E: The list of sources could not be read.
run the following
sed -i '/developer\.download\.nvidia\.com\/compute\/cuda\/repos/d' /etc/apt/sources.list.d/*
sed -i '/developer\.download\.nvidia\.com\/compute\/machine-learning\/repos/d' /etc/apt/sources.list.d/*
apt-get update
this should solve the issue
Method 2 (Not recommended)
Alternatively, you can manually install the keys (change $distro/$arch)
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/3bf863cc.pub
To Check your distro and architecture
Disto
uname -v
or
lsb_release -a
Architecture:
uname -i
Reference:
https://forums.developer.nvidia.com/t/notice-cuda-linux-repository-key-rotation/212771
https://github.com/NVIDIA/cuda-repo-management/issues/4
https://forums.developer.nvidia.com/t/updating-the-cuda-linux-gpg-repository-key/212897/8
As others mentioned this issue is due to Cuda repo key rotation.
apt-key approach mentioned above didn't work for me.
I looked more about details on the nvidia forum and came across another method from user (olyuninv) where you have to copy the below command in Dockerfile before apt-get update as follows:
COPY ./cuda-keyring_1.0-1_all.deb cuda-keyring_1.0-1_all.deb
RUN rm /etc/apt/sources.list.d/cuda.list
&& rm /etc/apt/sources.list.d/nvidia-ml.list
&& dpkg -i cuda-keyring_1.0-1_all.deb
RUN apt-get update
Don't forget to download keys first according to your OS version from here.
You have to basically use below command:
wget https://developer.download.nvidia.com/compute/cuda/repos/$distro/$arch/cuda-keyring_1.0-1_all.deb
(But have to replace $distro/$arch with your OS version, more details in the link)
If interested, more details might be available here on this nvidia cuda gitlab ticket.
References:
1: https://forums.developer.nvidia.com/t/invalid-public-key-for-cuda-apt-repository/212901/7
2: https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
3: https://gitlab.com/nvidia/container-images/cuda/-/issues/158
I found the solution. This error was occuring due to NVidia GPG key rotation occurred today. All the details are provdhttps://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/
Related
I was installing Wine on linux and up on following the guide instructions on this article, install wine, I came across these errors :-
W: GPG error: https://dl.winehq.org/wine-builds/ubuntu xenial
InRelease: The following signatures couldn't be verified because the
public key is not available: NO_PUBKEY 76F1A20FF987672F
E: The repository 'https://dl.winehq.org/wine-builds/ubuntu xenial
InRelease' is not signed.
I looked for solutions but I could not find one. I decided to create a post and my solution to this problem.
Find the solution in the answers.
The solution is easy.
Add the required public key using the below command line:-
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 76F1A20FF987672F
Now you can run:-
sudo apt update && sudo apt upgrade -y
And you are sorted
I am trying to install node.js latest version from node.js source official github repo. but after all running all commands yet, at apt-get install nodejs. system installs nodejs 10 version. I have already tried to this stack overflow. but even after running & installing software-common-properties. nothing changes.
The error showing up when i run curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash - is:
## Installing the NodeSource Node.js 17.x repo...
## Populating apt-get cache...
+ apt-get update
Ign:1 http://download.webmin.com/download/repository sarge InRelease
Hit:2 http://download.webmin.com/download/repository sarge Release
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Ign:5 http://ppa.launchpad.net/certbot/certbot/ubuntu focal InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:9 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Err:10 http://ppa.launchpad.net/certbot/certbot/ubuntu focal Release
404 Not Found [IP: 91.189.95.85 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/certbot/certbot/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Error executing command, exiting
kindly help. thank you.
when i was running curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash - in terminal. then the command was not succedding for some reasons and failing (details below). due to that the nodejs version in the apt repo cache was not updating. so when i was installing nodejs by running apt-get install nodejs, it was always installing version 10.
so make sure that this command curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash - should run till end without any issue. in the last if sudo apt-get install -y nodejs line appears then your apt repo cache is updated. otherwise the command is failing.
The reason for failure in my case:
i had certbot installed which had added a source in the /etc/apt/sources.list.d/ directory. the problem was not with certbot install itself but with its apt source url. when apt-get update command was being run, then certbot source was being looked for which was not found on specified url. so it was causing 404 and hence failure. so i went to /etc/apt/sources.list.d/certbot-ubuntu-certbot-focal.list and commented all lines(only one line was active there). then again run the curl command. It worked this time.
so my advice is:
make sure curl command works properly. for this i suggest to look for specific place where it is failing. I mean actually debug the script that is loaded from curl command. there are a lot of bash commands mentioned which is seting up everything.
In my Jenkins pipeline, I am trying to run a build using the Docker image maven:3.5.4-jdk-10-slim as my Jenkins agent. Inside it, I run the command apt-get update. However, when I do, I get the following error:
Get:1 http://deb.debian.org/debian sid InRelease [165 kB]
Err:1 http://deb.debian.org/debian sid InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
I searched online for help on this error, and it was advised I add the following 2 commands before my update command so I can add the public keys for apt to verify:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9
However, now I get a different error when running those commands:
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
I also searched for help on that error, and I was advised to run this before the 2 new commands : apt-get update && apt-get install -y gnupg
But I can't run apt-get update. How can I fix this?
I encountered the same problem. For me, the following had solved the issue.
I realized, that I was using a very old version of docker:18-dind to build images in my CI. This 18-dind was more like a puppet, that built and pushed images. It was able to build images, except that based on Ubuntu 22, for example, eclipse-temurin.
I updated my Docker build puppet from 18-dind to 20-dind and it solved the issue.
I'm trying to update my repository and I keep getting an error from docker and I don't know how to fix it.
Error:
Failed to fetch https://download.docker.com/linux/ubuntu/dists/focal/InRelease
403 Forbidden [IP: 2600:9000:2251:e800:3:db06:4200:93a1 443]
E: The repository 'https://download.docker.com/linux/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I'm assuming I have to add the InRelease file to docker manually but I need guidance since I'm completely new to ubuntu.
Have you added the official GPG key following the official docker installation on ubuntu?
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Assuming you are on a x86_64/amd64 system, execute:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
I recommend you to follow that guide instead of installing by apt.
I have a problem when adding a ppa repository in my docker container.
My ubuntu version in the container is 16.04 that supposed to be xenial, but when I added a ppa repository using add-apt-repository it's using groovy. The problem is, bitcoin ppa repository isn't available yet on groovy release.
How to fix this problem ?
Here my Dockerfile
FROM ubuntu:16.04
FROM node:12.18.1
RUN apt update && apt dist-upgrade -y
RUN apt install software-properties-common -y
RUN add-apt-repository ppa:bitcoin/bitcoin
RUN apt update
This is the errors output :
Step 5/19 : RUN add-apt-repository ppa:bitcoin/bitcoin
---> Running in af0bb3a110cf
NOT MAINTAINED. The OS-library linking packages here had a series of issues.
PLEASE DOWNLOAD DIRECTLY FROM bitcoincore.org (and verify the signatures of said files).
IF YOU WANT AUTO-UPDATES, please see the officially-maintained snap package -
https://github.com/bitcoin-core/packaging/tree/master/snap
More info: https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin
gpg: keybox '/tmp/tmpq1hxj8km/pubring.gpg' created
gpg: key D46F45428842CE5E: 3 signatures not checked due to missing keys
gpg: /tmp/tmpq1hxj8km/trustdb.gpg: trustdb created
gpg: key D46F45428842CE5E: public key "Launchpad PPA for Bitcoin" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: no valid OpenPGP data found.
Removing intermediate container af0bb3a110cf
---> 2949a066b51f
Step 6/19 : RUN apt update
---> Running in 2a3109f824ca
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Get:1 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Ign:2 http://deb.debian.org/debian stretch InRelease
Get:3 http://deb.debian.org/debian stretch-updates InRelease [93.6 kB]
Get:4 http://deb.debian.org/debian stretch Release [118 kB]
Get:5 http://security.debian.org/debian-security stretch/updates/main amd64 Packages [529 kB]
Get:6 http://deb.debian.org/debian stretch-updates/main amd64 Packages [28.2 kB]
Get:7 http://deb.debian.org/debian stretch Release.gpg [2410 B]
Get:8 http://deb.debian.org/debian stretch/main amd64 Packages [7083 kB]
Ign:9 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu groovy InRelease
Err:10 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu groovy Release
404 Not Found
Reading package lists...
E: The repository 'http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu groovy Release' does not have a Release file.
The command '/bin/sh -c apt update' returned a non-zero code: 100
The problem is in your Dockerfile:
FROM ubuntu:16.04
FROM node:12.18.1
The second FROM command overwrites the first.
I can't seem to find a Node.js image based off of Xenial. You can try one the following methods:
Use node:12.18.1 as your base image, but use one based off of something like Debian which might meet your requirements.
Use ubuntu:16.04 as your base image, and install Node.js in it using something like:
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs