Saturday, August 19, 2017

16.04 - apt-get update GPG error



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.



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 ran sudo 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)


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...