On my Windows machine, proxy settings are basic:
Automatic Proxy setup:
Automatically detect settings : checked
On my Windows machine, I've installed a Linux subsystem (Ubuntu). I'm trying to perform a sudo apt update
or a sudo apt install ...
. Apparently, in order to get this done, I need to fill in /etc/apt/apt.conf
(this file does not exist yet).
I've created that file and very naïvely, I've entered the following:
Linux Prompt> cat apt.conf
Acquire::http::proxy "http://<proxy>";
Acquire::https::proxy "https://<proxy>";
Acquire::ftp::proxy "ftp://<proxy>";
Acquire::socks::proxy "socks:<proxy>";
This, obviously, does not work, and I don't know about any basic proxies, used by my computer, so this leaves me with two possibilities:
- Either I search for a proxy, used by my computer, and I fill it in in
/etc/apt/apt.conf
file.
- Either I configure
/etc/apt/apt.conf
in order to detect proxy settings automatically, just like the "parent" Windows machine.
Which of the two options is best and how do I do it?
Thanks
Edit, some background
I wanted to do some sudo apt install
(it's a consequence of this Superuser question, but as an example, let's take "emacs-gtk"):
Linux Prompt> sudo apt install emacs-gtk
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package emacs-gtk
When I do a sudo apt update
:
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Err:4 http://archive.ubuntu.com/ubuntu focal-backports 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://archive.ubuntu.com/ubuntu focal InRelease' is not signed.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
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://security.ubuntu.com/ubuntu focal-security InRelease' is not signed.
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://archive.ubuntu.com/ubuntu focal-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.
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://archive.ubuntu.com/ubuntu focal-backports 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.
As requested: I pinged "8.8.8.8", and there everything seems to be fine:
Linux Prompt> ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=9.47 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=9.84 ms
...
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 9.164/9.388/9.838/0.226 ms
I thought that the apt install
problems were due to the /etc/apt/apt.conf
file (containing the proxy settings), hence my question.