mintsources is missing a dependency on python-apt
Bug #1656581 reported by
Przemek Wesolek
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux Mint |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
After upgrade to 18.1 from 18.0 I can't add new PPA repositories with
add-
The reason is the error
Traceback (most recent call last):
File "/usr/lib/
import aptsources.distro
ImportError: No module named aptsources.distro
The mentioned module is in package python-apt (also in python3-apt, but mintsources uses Python 2), which is not installed as a dependency of mintsources.
Installing python-apt solves the problem.
Changed in linuxmint: | |
status: | New → Confirmed |
To post a comment you must log in.
Using lmde betsy I see a similar but different problem. Perhaps this problem and the one I reported last week are related to a transition from python2 to python3? Link https:/ /bugs.launchpad .net/linuxmint/ +bug/1655210
It seems to mix python2 and python3 based on the backtrace, though apparently I do have some dependency on apt:
root@mg:~# mintsources linuxmint/ mintSources/ mintSources. py", line 1558, in <module> ().run( ) linuxmint/ mintSources/ mintSources. py", line 716, in __init__ "general" ]["use_ ppas"] == "false":
Traceback (most recent call last):
File "/usr/lib/
Application
File "/usr/lib/
if self.config[
KeyError: 'general'
root@mg:~# which python
/usr/bin/python
root@mg:~# ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 Dec 20 04:15 /usr/bin/python -> python2.7
root@mg:~# head -1 /usr/bin/ mintsources
#!/usr/bin/python3
root@mg:~# dpkg -l | grep -i apt | grep -i python
ii python-apt 1.1.0~beta5 amd64 Python interface to libapt-pkg
ii python-apt-common 1.1.0~beta5 all Python interface to libapt-pkg (locales)
ii python3-apt 1.1.0~beta5 amd64 Python 3 interface to libapt-pkg
root@mg:~# dpkg -l | grep -i mintsources
ii mintsources 1.6.3 all Software Sources configuration tool
root@mg:~# add-apt-repository ppa:some/repo linuxmint/ mintSources/ mintSources. py", line 1551, in <module> parser. get("general" , "base_codename") python2. 7/ConfigParser. py", line 330, in get section) NoSectionError: No section: 'general'
Traceback (most recent call last):
File "/usr/lib/
codename = config_
File "/usr/lib/
raise NoSectionError(
ConfigParser.
Testing removal of deps:
root@mg:~# apt-get autoremove --purge python-apt --simulate
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
python-apt*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Purg python-apt [1.1.0~beta5]
root@mg:~# apt-get autoremove --purge python3-apt --simulate appindicator3- 0.1* mintupdate* python3-apt* python3-pycurl* upgrades* appindicator3- 0.1 [0.4.92-4]
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
gdebi-core* gir1.2-
unattended-
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
Purg gdebi-core [0.9.5.7+nmu1]
Purg mintupdate [5.2.0]
Purg gir1.2-
Purg unattended-upgrades [0.93.1]
Purg python3-apt [1.1.0~beta5]
Purg python3-pycurl [7.43.0-2]
root@mg:~# apt-get autoremove --purge $(deborphan --guess-all)
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
python3-gi*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 958 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.