<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=2634489&amp;fmt=gif">

Infrastructure, Google Workspace, Getting Started with Google Cloud

sudo apt -get update error

By Anand Deshpande | January 21, 2022

Hi team, I running this simple apt -get update command while doing SSH in my compute engine instance, I get following error -root@iot-device-simulator:~# sudo apt-get update;
Err:1 https://deb.debian.org/debian buster InRelease                                                                                                           
  Could not connect to debian.map.fastly.net:443 (199.232.98.132), connection timed out Unable to connect to deb.debian.org:https:
Err:2 https://deb.debian.org/debian buster-updates InRelease                                                                                                   
  Unable to connect to deb.debian.org:https:
Err:3 https://deb.debian.org/debian buster-backports InRelease                                                                                                 
  Unable to connect to deb.debian.org:https:
Err:4 https://security.debian.org/debian-security buster/updates InRelease                                                                                     
  Could not connect to security.debian.org:443 (151.101.66.132), connection timed out Could not connect to security.debian.org:443 (151.101.2.132), connection timed out Could not connect to security.debian.org:443 (151.101.130.132), connection timed out Could not connect to security.debian.org:443 (151.101.194.132), connection timed out
Err:5 http://packages.cloud.google.com/apt cloud-sdk-buster InRelease                                               
  Could not connect to packages.cloud.google.com:80 (142.250.125.101), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.113), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.100), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.139), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.102), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.138), connection timed out
Err:6 http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-buster InRelease
  Unable to connect to packages.cloud.google.com:http:
Err:7 http://packages.cloud.google.com/apt google-compute-engine-buster-stable InRelease
  Unable to connect to packages.cloud.google.com:http:
Reading package lists... Done                                 
W: Failed to fetch https://deb.debian.org/debian/dists/buster/InRelease  Could not connect to debian.map.fastly.net:443 (199.232.98.132), connection timed out Unable to connect to deb.debian.org:https:
W: Failed to fetch https://security.debian.org/debian-security/dists/buster/updates/InRelease  Could not connect to security.debian.org:443 (151.101.66.132), connection timed out Could not connect to security.debian.org:443 (151.101.2.132), connection timed out Could not connect to security.debian.org:443 (151.101.130.132), connection timed out Could not connect to security.debian.org:443 (151.101.194.132), connection timed out
W: Failed to fetch https://deb.debian.org/debian/dists/buster-updates/InRelease  Unable to connect to deb.debian.org:https:
W: Failed to fetch https://deb.debian.org/debian/dists/buster-backports/InRelease  Unable to connect to deb.debian.org:https:
W: Failed to fetch http://packages.cloud.google.com/apt/dists/cloud-sdk-buster/InRelease  Could not connect to packages.cloud.google.com:80 (142.250.125.101), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.113), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.100), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.139), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.102), connection timed out Could not connect to packages.cloud.google.com:80 (142.250.125.138), connection timed out
W: Failed to fetch http://packages.cloud.google.com/apt/dists/google-cloud-packages-archive-keyring-buster/InRelease  Unable to connect to packages.cloud.google.com:http:
W: Failed to fetch http://packages.cloud.google.com/apt/dists/google-compute-engine-buster-stable/InRelease  Unable to connect to packages.cloud.google.com:http:
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@iot-device-simulator:~# ^C
root@iot-device-simulator:~# 

Best Answer:

Do you have Cloud NAT in your project?

Does that VM have any public IP at least?


Recent Articles

Data Analytics

Generative AI: Are You Behind?!

Review the latest insights from the AI Readiness Report.
By Bruno Aziza
Industry Solutions

Make "Gen AI Work": Landscape, SLMs vs. LLMs, Cost & More...

Discover the 5 metrics you need to know in order to be an exceptional CEO and Operator.
By Bruno Aziza
Google Cloud Strategy

AI Cheat Sheet

AI is no more and no less the drive to create robots with human minds so they can do everything we do and more. Use this cheat sheet to help decode the space.
By Leah Zitter