2

Suddenly sudo apt update is not working anymore on my Ubuntu 18.04.6 machine. I get the following error:

Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease
Get:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Err:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease
Err:3 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Err:4 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Reading package lists... Done
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
E: The repository 'http://us.archive.ubuntu.com/ubuntu bionic InRelease' is not signed.
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://us.archive.ubuntu.com/ubuntu bionic-security 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.
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://us.archive.ubuntu.com/ubuntu bionic-updates 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.

My /etc/apt/sources.list:

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
Ubuntu Update Repos

deb http://us.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse

My /etc/resolv.conf:

nameserver 1.1.1.1

I have tried changing the repository mirror to no luck. I tried running sudo apt update from within an Ubuntu docker image and the same error comes out.

Commenting out the source repos didn't change the situation.

Would this mean that this is a network issue? Or I can still do/check something?

UPDATE:

I am adding more details as suggested in the comments. /etc/apt/apt.conf does not exist and I am not using a proxy. This issue has been going on for the last month. I tried updating an Ubuntu bionic within Docker but I got the same result. I have also tried choosing another archive repository mirror, again with the same error.

th3owner
  • 21
  • 1
  • 1
  • 4

1 Answers1

0

So I was not able to fix the problem on the remote machine and since I currently do not have physical access to the machine I resorted to reverse SSH tunnelling and a SSH SOCKS5 proxy.

On my local machine I setup the SSH SOCKS5 proxy:

ssh -N -D 54322 localhost

Then on another terminal I created the reverse SSH tunnelling forwarding a port of the remote server to the proxy port (54322 in this case):

ssh -N -R 6667:localhost:54322 <server-ip> -o ServerAliveInterval=15 -o ServerAliveCountMax=3

Finally I created the file /etc/apt/apt.conf.d/proxy.conf and added the SOCKS5 proxy for APT:

Acquire:http:Proxy "socks5h://127.0.0.1:6667/"
Acquire:https:Proxy "socks5h://127.0.0.1:6667/"

This allowed me to run sudo apt update without any issues.

th3owner
  • 21
  • 1
  • 1
  • 4