Certbot - APT::Default-Release as such a release is not available in the sources

By xngo on May 17, 2020

I was trying to install Certbot on the Google cloud VM and I got the following error message:

apt-get -y install certbot python-certbot-apache -t stretch-backports
E: The value 'stretch-backports' is invalid for APT::Default-Release as such a release is not available in the sources

Solution

I checked /etc/apt/sources.list file and debian backport repositories are in the source list. At the first glance, the backport repositories paths are correct and consistent. Then, I noticed that all paths are pointing to Buster repositories while I ran my apt-get to request from stretch-backports. That was my problem. I re-ran my apt-get as follows.

apt-get -y install certbot python-certbot-apache -t buster-backports

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.