Raspbian stretch (NOOBS)
I have just received a new Raspberry Pi to run scripts on at work, and while I was installing the dependencies for Python 3.7, I ran into a peculiar issue.
The machine is connected to the internet and using the browser to connect to google.com and
188.8.131.52 (raspbian package index) works, as does using wget from the command line. However, trying to install dependencies using apt-get fails with the following error:
Err:1 http://raspbian.raspberrypi.org/raspbian/pool/main/s/sqlite3/libsqlite3-dev_3.16.2-5+deb9u1 Connection failed [IP 184.108.40.206 80] E: Failed to fetch [...].deb Connection failed [IP: 220.127.116.11 80]
Trying to ping the package index leads to 100% packet loss, but connecting to it through the browser works, and using wget, I am able to retrieve the package from the URL in the error without issue.
On the topic of pinging, I cannot ping
Trying to install the package I downloaded with wget gives me an error message saying "The package download failed. Please check your network connectivity." Same for packages I downloaded from the index through the browser.
Trying to install the package through the "Add / Remove Software" menu option just fails without giving me any errors.
My hosts file is empty except for the loopback addresses. resolvconf only has google's 18.104.22.168 nameserver in it.
I cannot work out why this is not working, there is no pattern to what does and doesn't work.
It can't be the internet because I can use the browser.
It can't be the command line because I can use wget.
It can't be the package index itself or our company firewall because I can access the index through wget and browser.
It can't be the nameserver because pinging IPs also doesn't work sometimes.
My resolv.conf file is changing.
Before I rebooted my Pi, it read
but after I rebooted it, it now reads
# Generated by resolvconf nameserver 22.214.171.124 nameserver 126.96.36.199
Pinging google returns
$ ping -c5 -W5 google.com PING google.com (188.8.131.52) 56(84) bytes of data. --- google.com ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4155ms
Seeing the namespace resolve suggests to me that this may be a firewall/proxy issue that I'd need to contact my company's sysadmin about. This still doesn't explain why ping packets are being blocked but HTTP packets are not unless that is something a firewall can do, and if that is the case, what kind of packets is apt using s.t. I can access the package index through the browser, but not through apt-get?