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.