[SOLVED] Synaptic "Repositories changed", python error

Questions about applications and software
Forum rules
Before you post please read this

[SOLVED] Synaptic "Repositories changed", python error

Postby Flemur on Thu Oct 18, 2012 10:37 am

Hi - I added a repository to apt/synaptic and now I get errors messages when trying to view repositories. Other apt functions seem to work OK. I've found some "solutions" online, but they don't work.

I wanted to play with "systemd", so did this:
$ sudo add-apt-repository ppa:pitti/systemd
(Just to keep things amusing, there's "add-apt-repository" and "apt-add-repository" - they act the same)

Which gaves this:
Code: Select all
$ sudo add-apt-repository ppa:pitti/systemd
You are about to add the following PPA to your system:
 WARNING! THIS IS A DEMO ONLY! Only use this if you know what you are doing, and preferably only in virtual or real machines which you can easily reinstall.

Packages to run Ubuntu 12.04 with systemd.

Install at least systemd with its recommends (libpam-systemd and ubuntu-systemd-units). You can either install systemd-sysv, or set "init=/lib/systemd/systemd" in the kernel command line in the grub menu, so that you can switch between upstart and systemd.
 More info: https://launchpad.net/~pitti/+archive/systemd
Press [ENTER] to continue or ctrl-c to cancel adding it

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 160, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 96, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 584, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)
 [b] File "/usr/lib/python2.7/dist-packages/aptsources/distro.py", line 87, in get_sources
    raise NoDistroTemplateException("Error: could not find a "
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template[/b]


Now when I run synaptic and try to look at repositories (and "systemd" isn't showing up), it says in a popup window:
Code: Select all
"Repositories changed
The repository information has changed. You have to click on the "Reload" button for your changes to take effect"


Pressing "Reload" doesn't fix anything"

One non-working solution indicated that some sort of non-matching version breaks apt (did I get some "Ubuntu" someplace where it should be "Mint"...?):

Code: Select all
$ lsb_release -a
No LSB modules are available.
Distributor ID:   LinuxMint
Description:   Linux Mint 13 Maya
Release:   13
Codename:   maya

and
Code: Select all
$ cat /etc/lsb-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=13
DISTRIB_CODENAME=maya
DISTRIB_DESCRIPTION="Linux Mint 13 Maya"


"$ sudo apt-get update" show no errors.

I'm not sure what this means, but it was part of a "solution" didn't make much sense:

Code: Select all
$ apt-cache policy base-files
base-files:
  Installed: 6.5ubuntu6.2
  Candidate: 6.5ubuntu6.2
  Version table:
 *** 6.5ubuntu6.2 0
        500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     6.5ubuntu6 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages


As far as I can tell, the strring "pitti" doesn't appear in any apt files (might've missed some, they're not as localized as they should be...)

???? TIA!
Last edited by Flemur on Thu Oct 18, 2012 6:22 pm, edited 1 time in total.
Mint 17/Xfce/fluxbox & another Mint 17/Xfce/fluxbox with jackd audio.
User avatar
Flemur
Level 5
Level 5
 
Posts: 963
Joined: Mon Aug 20, 2012 9:41 pm

Linux Mint is funded by ads and donations.
 

Re: Synaptic "Repositories changed", python error

Postby xenopeek on Thu Oct 18, 2012 11:43 am

Please share the output of:
Code: Select all
inxi -r

so we can see all your configured repositories.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14965
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Synaptic "Repositories changed", python error

Postby Flemur on Thu Oct 18, 2012 12:01 pm

Here 'tis, thanks.

Code: Select all
$ inxi -r
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://packages.linuxmint.com/ maya main upstream import
           deb-src http://packages.linuxmint.com/ maya main upstream import #Added by software-properties
           deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
           deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
           deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
           deb http://archive.canonical.com/ubuntu/ precise partner
           deb http://packages.medibuntu.org/ precise free non-free
           deb http://archive.getdeb.net/ubuntu precise-getdeb apps
           deb http://archive.getdeb.net/ubuntu precise-getdeb games
           Active apt sources in file: /etc/apt/sources.list.d/liquorix.list
           deb http://liquorix.net/debian sid main
           Active apt sources in file: /etc/apt/sources.list.d/otto-kesselgulasch-gimp-precise.list
           deb http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu precise main
           deb-src http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu precise main
           Active apt sources in file: /etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list
           deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main
           deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main
           Active apt sources in file: /etc/apt/sources.list.d/xubuntu-dev-xfce-4_10-precise.list
           deb http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main
           deb-src http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main
$
Mint 17/Xfce/fluxbox & another Mint 17/Xfce/fluxbox with jackd audio.
User avatar
Flemur
Level 5
Level 5
 
Posts: 963
Joined: Mon Aug 20, 2012 9:41 pm

Re: Synaptic "Repositories changed", python error

Postby xenopeek on Thu Oct 18, 2012 12:25 pm

Weird. That all looks fine, and I can add that repository with the command you shared (sudo add-apt-repository ppa:pitti/systemd) without problems. The repository you tried to add is indeed not in any of the configuration files.

The files listed in the traceback come from the python-apt and python-software-properties packages. You could try reinstalling these.
Code: Select all
sudo apt-get install --reinstall python-apt python-software-properties
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14965
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

[SOLVED]Re: Synaptic "Repositories changed", python error

Postby Flemur on Thu Oct 18, 2012 1:23 pm

I reinstalled the pythons, no difference.

The python error:
File "/usr/lib/python2.7/dist-packages/aptsources/distro.py", line 87, in get_sources
I've seen ascribed to "you haven't updated the distribution template": http://ubuntuforums.org/showthread.php?t=1966730)
and also a bug: https://bugs.launchpad.net/elementaryos/+bug/1065618

More confusion here: http://askubuntu.com/questions/49040/ap ... late-error
and here: http://www.addictivetips.com/ubuntu-lin ... ntu-11-10/

FIXED! (but why, I don't know...)

Some fixes pointed to either installing or uninstalling "mintupdate"; I had uninstalled "mintupdate" and reinstalled it several times, and it made no difference ... until just now: I reinstalled "mintupdate" and the errors are gone....maybe some reboots made the difference?

FWIW, I think "mintupdate" is basically broken, which is why I uninstalled it in the first place (and apt-get and synaptic were working fine until I tried to add the "pinni" repository): it crashes trying to use it, then re-running it some popups say "Could not download all repository indexes" and "E: Could not get lock", then it crashes again.

So I removed mintupdate again just now, and synaptic gave the same "Repositories changed" error. Put mintupdate back and the synaptic error is gone. Some combo of "mintupdate not installed" and "add a repository" seems to break things.

Thanks for the help!

Edit/update: after reinstalling mintupdate I was able to add the pitti repository and install "systemd" without problems...well, without installation problems, at least.
Mint 17/Xfce/fluxbox & another Mint 17/Xfce/fluxbox with jackd audio.
User avatar
Flemur
Level 5
Level 5
 
Posts: 963
Joined: Mon Aug 20, 2012 9:41 pm


Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 11 guests