3

I have installed Linux raspberrypi 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux on my Raspberry Pi 3 using SD card.

When I try to install packages I am getting error:

E: The value '\stable' is invalid for APT::Default-Release as such a release is not available in the sources

How do I resolve this error?

3

Background

I got a very similar error when using an SD card image of basically unknown origins and trying to upgrade my packages. It turns out there's a config file that says \stable and it needs to match the name of the Raspbian release instead.

It looks like my image, as well as your image, was using the "stable" branch at the time it was made. You can read more about the Debian branches (Raspbian is a derivative of Debian) here.

You'll need to find which branch you're using, which I found out how to do here, using the command cat /etc/os-release. For example, it will say something like this:

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

I found several articles and Q&A sites with a similar error, but I had to do my own poking around to find the file to edit (SuperUser, LinuxQuestions.org, AskUbuntu). Funnily enough, I found the answer while typing up this answer.

How to fix the problem

Edit this file:

sudo nano /etc/apt/apt.conf.d/10defaultRelease

There will be a single line in that file, and change it from

APT::Default-release \"stable";

to

APT::Default-release \"jessie";

And then save and exit. You will now be able to use sudo apt-get upgrade, and presumably any other apt function. I was able to do the upgrade, and then install packages after doing this.

  • Bonjour je confirme que pour moi ,ayant eu le même problème sur mon rapsberry pi 3, tous fonctionnent merci ;) The value '\stable' is invalid for APT::Default-Release as such a release is not available in the sources , rapsberry pi 3 apt-get update,apt-get upgrade , – darling 24 Sep 24 '18 at 7:10
-4

Check your internet connection.

  • yes i have removed my ethernet and connect wifi.is there option to use like pc.in we dont want to remove wifi and LAN cables vice versa – user1811790 Jun 15 '17 at 12:47
  • I might advise you @user1811790 that marking an answer with the green tick should only be for an answer that enabled you to solve your problem. It should not be used as an alternative to up-voting. – Darth Vader Jun 15 '17 at 15:25
  • 2
    Also @user68821 that is a very poor attempt at answering the question. You have not explained in anyway what the original problem might have been caused by and why your solution works. – Darth Vader Jun 15 '17 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.