apt-get update GPG error
Well, this is really humiliating, but I just found the solution.
After trying everything imaginable, including different proposals on launchpad, I finally, by accident, realized the partition "/" was full.
Background to this: I have several partitions and drives, one of them a luks encrypted external HDD that I use for daily rsync backups. After a reboot, I apparently forgot to mount the luks drive. The drive was supposed to be mounted to /mnt/ehhd, but as the drive had not been mounted, the directory fell to the / partition, and that partition is way too small for the backup to succeed.
My assumption is, that as the partition / was 100 % full, apt update
could not save the get info, and therefore it was not successful.
THE SOLUTION
- I cleared my /mnt/ehhd directory
- Mounted the external (luks encrypted) drive to /mnt/ehdd
- I ran
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
as the apt update failed because of "no public key" - I ran
sudo apt clean
- I ran
sudo apt update
I ransudo apt upgrade
And with that the problem was solved.
So in conclusion, if you find yourself in a similar situation, make sure your partitions have available space on the (duh...)
The error message was just too cryptic for me, and I suggested on the launchpad site that it would save a lot of hassle if the error message would be more clearly stated.
(Great to get this solved before the weekend, now I can get to sleep in peace)
Related videos on Youtube
user2879867
Updated on September 18, 2022Comments
-
user2879867 over 1 year
I've been searching for a solution for this most of the day, but none of my googling has had any results that work for my case.
I have a server running Ubuntu 16.04.3 LTS (4.4.0-98-generic).
Today, I updated the system using "apt update" and "apt upgrade". No problems. After this, I wanted to remove owncloud, as I only tested it briefly. I tried to run "apt remove owncloud", but for some reason it did nothing. I then when through aptitude, and successfully got it removed.
After this, just to double check, I ran "apt update" again.
This time I got multiple errors:
Get:1 http://mirror.netinch.com/pub/mariadb/repo/10.1/ubuntu xenial InRelease [3,874 B] 0% [1 InRelease gpgv 3,874 B] [Connecting to fi.archive.ubuntu.com (91.189.88.161)] [Waiting for headers] [Waiting for headers]Splitting up /var/lib/apt/lists/partial/mirror.netinch.com_pub_mariadb_repo_10.1_ubuntu_dists_xenial_InReleaseErr:1 http://mirror.netinch.com/pub/mariadb/repo/10.1/ubuntu xenial InRelease Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB] Get:3 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease [23.9 kB] Err:3 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease Splitting up /var/lib/apt/lists/partial/ppa.launchpad.net_ondrej_php_ubuntu_dists_xenial_InRelease into data and signature failed Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) Get:4 http://fi.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Err:2 http://security.ubuntu.com/ubuntu xenial-security InReleaseting up /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial-security_InRelease into data and signature failed Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) Get:5 http://security.ubuntu.com/ubuntu xenial InRelease [247 kB] Err:5 http://security.ubuntu.com/ubuntu xenial InRelease Splitting up /var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_xenial_InRelease into data and signature failed Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) Err:4 http://fi.archive.ubuntu.com/ubuntu xenial InReleaseg up /var/lib/apt/lists/partial/fi.archive.ubuntu.com_ubuntu_dists_xenial_InRelease into data and signature failed Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) Get:6 http://fi.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB] Err:6 http://fi.archive.ubuntu.com/ubuntu xenial-updates InReleaser/lib/apt/lists/partial/fi.archive.ubuntu.com_ubuntu_dists_xenial-updates_InRelease into data and signature failed Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) Get:7 http://fi.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB] Err:7 http://fi.archive.ubuntu.com/ubuntu xenial-backports InReleasefi.archive.ubuntu.com_ubuntu_dists_xenial-backports_InRelease into data and signature failed Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) Reading package lists... Done E: GPG error: http://mirror.netinch.com/pub/mariadb/repo/10.1/ubuntu xenial InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) E: GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) E: GPG error: http://security.ubuntu.com/ubuntu xenial-security InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) E: GPG error: http://security.ubuntu.com/ubuntu xenial InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) E: GPG error: http://fi.archive.ubuntu.com/ubuntu xenial InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) E: GPG error: http://fi.archive.ubuntu.com/ubuntu xenial-updates InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?) E: GPG error: http://fi.archive.ubuntu.com/ubuntu xenial-backports InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)
After this, I have searched for a solution to this, but none of the suggested solutions work.
The server does not use proxy (and neither is the ISP), so this is not a proxy problem.
I have tried so many proposed solutions, that I honestly can't even remember everything I've tried, but at least the following:
- apt clean -> apt update = same end result (apt clean is successful)
- manually remove /var/lib/apt/lists and /var/lib/lists/partial
- recreated /etc/apt/sources.list using https://repogen.simplylinux.ch/
- manually created /etc/apt/trusted.gpg.d/ files
- Tried using other country repos
The server is a standalone computer, not VM Connected by LAN (can't be WiFI or Mobile broadband issues)
The server only has Samba, OpenVPN (mandatory) and for internal testing apache, php and mariadb (optional).
So, is there any way to just "default" everything "apt-get" related, so that updates will work?
At the moment the server is up and running (everything works), so this is not critical, but I like to keep the server up to date, as it's connected to the internet.
As this is a server, I don't have access to any GUI tools. (only access by ssh)
Please, do not automatically mark as duplicate, as I think I have tried all the similar problems solutions on this site already.
-
user2879867 over 6 yearsTried the suggested solutions on that page already, but unfortunately doesn't seem to apply to my case
-
user2879867 over 6 yearsWell, I would lie if I said 100 % certain, but been using the same ISP for 4 years now (same contract), so the only explanation would be that they suddenly changed something today. And the server has (or the router) a static public IP, so it's tapped directly to the web.
-
user2879867 over 6 yearsCan't use the proxy check tool on the server, as there is only command line
-
user2879867 over 6 yearsYes, gives 404 Not Found (also by replacing "trusty" with "xenial" in that url). And to add to this, the OpenVPN link works normally, I can ping, and wget normally, so the connection to Internet works. Seems like this is specifically a local apt-get problem
-
Terrance over 6 yearsCould be a bug then. We might not be able to help you with this. I would recommend that you follow this help.ubuntu.com/community/… specifically Steps 6 and 7. I am no longer of help here as I cannot duplicate your issue so I will not have an answer for you.
-
user2879867 over 6 yearsThank you for your help none the less :) I'll try those steps, and will post here if/when I find a solution.
-
user2879867 over 6 yearsUnfortunately, I already tried going back to "default", by creating a bare minimum of repos using the tool: repogen.simplylinux.ch So at the moment that directory is empty
-
FedFranz over 6 yearsFor what I see, that tool only generates sources.list and gpg_keys.txt. Did you try "ppa-purge"? Did you remove all the GPG keys using "apt-key del"?
-
FedFranz over 6 yearsAlso, maybe a silly idea... since troubles started after removing owncloud... Did you try reinstalling it? :)
-
user2879867 over 6 yearsI don't have ppa-purge installed, and as it stands, can't install anything. Tried
sudo apt-get purge
andsudo apt-key del
, but still same result -
logoff almost 6 yearsI realised today that my /tmp folder mounted as a separate partition as tmpfs was full producing the error. I just freed some space in the folder and the
apt update
command worked. -
kap about 5 yearsThanks, this helped. I just want to add: my
/
mount was full a few weeks ago. I have cleared it up, and when I now wanted to update the system I ran into the same errors. Your solution helped (with the difference that I had enough free disk space).