14

After an upgrade from Debian Squeeze (stable) to Wheezy (testing), Synaptic fails with the following error:

E: The value 'stable' is invalid for APT::Default-Release as such a release is not available in the sources
E: _cache->open() failed, please report.

However, this value is set nowhere in /etc. How do I fix this error?

5 Answers 5

11

Have a look into /root/.synaptic/synaptic.conf. Look for the DefaultDistro line and change its value, e.g. replace stable with wheezy.

0
11

I get the same error with apt, so it's unrelated to synaptic. However, this config exists:

# grep -ri stable /etc
/etc/apt.conf.d/99myDefaultRelease:APT::Default-Release "stable";

So changing that file to "jessie" would fix it in my case (as I'm on jessie.)

3
  • 2
    this one solved my problem in my raspberry pie 3 :D Commented Nov 14, 2017 at 4:46
  • Thanks, solved same problem on Debian
    – Matina G
    Commented Oct 15, 2019 at 9:59
  • In my particular case it happened when switching from stable to testing, so "testing" works too.
    – Demindiro
    Commented Jul 7, 2023 at 10:42
2

Even I was getting the same error, While I was updating my kali linux using apt-get update This is what I did and it worked for me.

grep -ri stable /etc

(some of you might get stable, testing, or rolling in the error message. Just replace that keyword in the above command and fire it)

I got a list of paths to files that used a stable keyword. after having a closer look I found this path.

/etc/apt/apt.conf.d/00local:APT::Default-Release "stable";

I removed this file using rm /etc/apt/apt.conf.d/00local and tried updating and it worked.

For However, this value is set nowhere in /etc. How do I fix this error? Maybe you should try the above steps in other directories too. :)

0

The error

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

(or stable or whatever) is likely due to a mismatch between /etc/apt or /etc/synaptic configuration files (in particular the sources.list file).

Make sure you use the same version name everywhere. E.g. make a choice between testing and trixie (or wheezy at the time the question was asked), or between stable and bookworm.

0

I had the same error:

E: The value 'jammy-infra-security' is invalid for APT::Default-Release as such a release is not available in the sources
E: _cache->open() failed, please report.

The synaptic.cfg which has this near the bottom of the file, DefaultDistro, mine had this in list Synaptic:

:DefaultDistro "jammy-infra-security";

Open root, edit the "jammy-infra-security" remove infra, save file and reload Synaptic. My synaptic ran after this, without errors.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .