Doing $ sudo apt-get update
gives E: Some index files failed to download. They have been ignored, or old ones used instead.
. After doing some digging i found this Cannot connect to mirrordirector.raspbian.org which explains that there is a DNS issue with mirrordirector, and to change the source in /etc/apt/sources.list.
I did so and my /etc/apt/sources.list went from looking like this
deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
to looking like this
#deb http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/
but this gave the error
E: Malformed line 4 in source list /etc/apt/sources.list (dist)
E: The list of sources could not be read.
I tried fixing it by adding wheezy main contrib non-free rpi
after the new source, but that just gave E: Some index files failed to download. They have been ignored, or old ones used instead.
I did also try uncommenting deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
but that just gave the same error again
I also did ping -c 1 8.8.8.8
and that gave
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_req=1 ttl=54 time=36.6 ms
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 36.601/36.601/36.601/0.000 ms
ping google.com
, a hostname, not an IP address. – goldilocks Mar 07 '20 at 15:14pig google.com
givesPING google.com (216.58.211.174) 56(84) bytes of data. 64 bytes from lhr48s13-in-f14.1e100.net (216.58.211.174): icmp_req=1 ttl=54 time=16.3 ms
. I can access the internet through my raspberry pi, but sometimes when trying to open a link I getSSH handshake failed
– ElkOnurb Mar 07 '20 at 15:26