When switching from one wifi network to another one, or when swtching to a VPN tunnel, DNS (in /etc/resolv.conf) are not being updated. The result is that no server can be retrieved.
After running "sudo resolvconf -u" I got a warning saying "/etc/resolv.conf is not a symbolic link to /etc/resolvconf/run/resolv.conf"
Indeed, /etc/resolv.conf was not a symbolic link and had the DNS of the network that I was using for installing the system.
Recreating the link fixed the problem.