I upgraded to 12.04 (64 bit) today, so far so good, everything worked great, until I tried doing some more advanced stuff.

When I tried adding the toolchain-test ppa, I got a mismatch on distribution. After a try or 4 this changed and linked me to this bug report. So far so good, a weird error but I'm not the only one and it will get fixed right?

But I found it a very weird error, and I also noticed some other (custom) apps behaving weird concerning my distribution version. So I tried to find out what release I'm running, these are the results I got:

>:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu quantal (development branch)
Release:    12.10
Codename:   quantal

>:~$ cat /etc/issue
Ubuntu quantal (development branch) \n \l

Now I'm wondering: did I do something wrong on installation? Did I accidentally download some weird nightly, set up wrong repositories, ...? Or is this simply a bug in some small part of the system that does the reporting wrong and maybe will confuse an app or two?

Now, whatever the reason: is there a simple way I can set this release information to the correct version again?

  • How did you upgrade anyway? Did you use a downloaded ISO, do-release-upgrade -d, or.. ? – Chan-Ho Suh Apr 27 '12 at 21:39
  • @Chan-HoSuh: Clean install (but kept /home), downloaded iso from ubuntu.com – KillianDS Apr 27 '12 at 21:39
  • 2
    Gratz in being the 1st using Quantal :D :D – Rinzwind Apr 28 '12 at 11:09
  • 2
    Installing the tool chain is the first step in the process of changing 12.04 into 12.10 for development testing. Each new release of Ubuntu is built upon the last release. You may now have the quantal repositories as your software sources. Check Software Updater>Settings and see if you still have the Precise repositories listed. Some of us make this change deliberately to share in testing Ubuntu development. We started yesterday. – grahammechanical Apr 28 '12 at 13:19
  • I did check the repositories (forget to mention, my mistake), those were still okay. But it is likely that installing the toolchain was the reason of the changed files, thank you for noticing. I always added the toolchain-test for more recent versions of gcc, without any problem in previous versions. – KillianDS Apr 28 '12 at 13:29

I had the exact same problem. In my case it was due to the fact that I had the ppa:ubuntu-toolchain-r/test enabled and even though only precise was listed as the series, the base-files package in there seems to belong to quantal. To find out from where the misbehaving base-files package is installed, use the following command:

$ apt-cache policy base-files

Find the line where the version matches the installed version and inspect the URL that is reported for that version.

If you want to keep the PPA enabled (e.g. because you want/must use the gcc-4.7 compiler), you can use apt-pinning to force the system into keeping the base-files package while allowing you to install gcc-4.7. Create the file /etc/apt/preferences.d/base-files (make sure not to use any dots in the name) with the following content:

Package: base-files
Pin: release o=Ubuntu
Pin-Priority: 1001

This will force a downgrade of the base-files package to its default version (from the main ubuntu repository) on the next upgrade.

Be extra careful about typographical errors, particularly spaces and capitalization.

Once the file is in place, use apt-cache policy base-files to determine the Candidate version. It should correspond to the version that is listed next to the default Ubuntu archive. Finally, start the downgrade:

$ sudo apt-get upgrade

When asked whether you really want to DOWNGRADE (capitalization not mine...), answer with y+Enter.

  • I also have deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main, so that I could run g++4.7 on precise, and I also now have quantal listed in /etc/issue. I'll try your fix. – Rob May 14 '12 at 14:54
  • I really wanted to use g++-4.7, so what I ended up doing in the end is to pin the base-files package to the http://archive.ubuntu.com origin using /etc/apt/preferences (see apt_preferences(5)). Of course, you'll need to adjust the URL to match your Ubuntu mirror listed in /etc/apt/sources.list. – Michael Wild May 15 '12 at 9:30
  • 1
    +1, now that's a good answer. Explains not only how to fix, but also the why's and when's of the issue – MestreLion May 15 '12 at 15:51
  • this helped me to fix this issue :) – suresh May 31 '12 at 20:18

As far as I know, once a package is upgraded it cannot be downgraded, with the exception being a procedure like REMOVE PACKAGE- > CHANGE REPO- > UPDATE APT -> REINSTALL OLD PACKAGE. Which is a quite odd procedure, as sometimes there are some dependencies and version issues.

Anyway, go to /etc/apt/sources.list and /etc/apt/sources.list.d/*.list and see if there are some rows containing the word "quantal".

If there are, then that's the problem. I would suggest you backup everything and reinstall a clean stable version. The other solution would be to change all the "quantal" words in "precise", re-update repos and hope that all of the quantal packages will be replaced with a more up-to-date precise version. But it's a VERY BAD solution!

  • Thanks for your answer. However, all the sources are correctly set to "precise". Since I have a quite fresh install, I still think I'll go with the "solution" of reinstalling everything from scratch – fdlm May 1 '12 at 10:06
  • @fdlm - have you followed the advice in the linked question? – Mark Rooney May 1 '12 at 10:19
  • @MarkRooney Now that I did, everything seems to work fine. Thanks everyone for your help. – fdlm May 1 '12 at 12:13
  • Packages can be downgraded directly, but that's not something that is generally tested and may in some situations cause trouble. – ibid Aug 25 '12 at 13:53

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.