Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

apt-get update fails on debian on google compute engine

Updating repositories information and installing packages is failing on a debian instance on google-compute-engine with the following error:

E: Release file for http://gce_debian_mirror.storage.googleapis.com/dists/wheezy-updates/Release is expired (invalid since 5h 44min 5s). Updates for this repository will not be applied.

It seems that there is a problem with the repository (or I am missing something).

Thanks in advance.

like image 915
baskin Avatar asked Oct 30 '14 14:10

baskin


People also ask

Does apt-get work on Debian?

apt-get is a tool to automatically update your Debian machine and get and install debian packages/programs! This tool is a part of the DebianPackageManagement system.

How do I fix apt-get error?

Another approach to solving the broken package issue via apt-get is to edit the “/etc/apt/sources/list” file and adding sites with newer versions of packages available. Then running the “apt-get update” command to update the repository list.

How do I force upgrade apt-get?

Copy and paste sudo dpkg --configure -a into the Terminal. You can also try: sudo apt-get install -f to fix broken dependencies.

How do I fix Apt update error in Ubuntu?

1) In the first step open the Terminal & type, apt-get update and then press the enter button. Now make sure you got a similar error as shown in the picture below. 2) Now open the app drawer & search “Software & Update”, now open the app from the search result. 3) Now go to the Ubuntu Software section.


2 Answers

I believe this is due to expired support for the mirror. I had success with the following commands:

sudo aptitude -o Acquire::Check-Valid-Until=false update
sudo apt-get -o Acquire::Check-Valid-Until=false update

As a side note/question, I find that deploying a hadoop cluster on google compute engine is failing this morning as well (e.g., directory /home/hadoop is empty). Just wondering if any google reviewers could comment on this. Thanks!

like image 131
Rich Avatar answered Oct 04 '22 20:10

Rich


How about using temporarily the default Debian sources.list until Google fixes the problem with their mirror?

For Debian7, the list is here: https://wiki.debian.org/SourcesList

You can also use a sources.list generator: http://debgen.simplylinux.ch/

like image 38
Nick De Greek Avatar answered Oct 04 '22 19:10

Nick De Greek