Why apt-get update fail to connecting to dl.google.com?

When I have this problem, I disable IPv6 in Ubuntu and that fix the problem, in order to do that, please follow these steps:

To disable IPv6, you have to open /etc/sysctl.conf using any text editor and add the following lines at the end:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

If IPv6 is still enabled, then the problem is that sysctl.conf is still not activated.

In that case, open a terminal(Ctrl+Alt+T) and type the command:

sudo sysctl -p

The output will be very similar to these 3 lines:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

After that, execute:

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6

If you see 1 in the output, then IPv6 has been successfully disabled.

1

Hope this helps.