I tried to install a mutagen package, available according to apt-cache:

$ apt-cache madison mutagen
   mutagen |   1.40.0-2 | http://deb.debian.org/debian buster/main Sources

apt-get won't deliver:

$ sudo apt-get install mutagen
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package mutagen

I tried apt-src:

$ sudo apt-src install mutagen

The result was catastrophic: it made a grand show, apparently installing the entire python and everything (already present in the system).

So I have to (a) locate the damage and remove it and (b) install mutagen the right way. How am I supposed to go about it?

mutagen |   1.40.0-2 | http://deb.debian.org/debian buster/main Sources

says that mutagen is a source package, not a binary package. If you want to install the Python module using apt-get, you need to find the relevant binary package;

apt showsrc mutagen

will list them. You presumably want either

sudo apt install python3-mutagen


sudo apt install python-mutagen

depending on the version of Python you’re installing.

Cleaning up after your sudo apt-src install will involve removing any build-dependency you don’t need. Look at the Build-Depends line in the output from apt showsrc above, and remove any package you don’t think you need — one good approach is to mark them as automatically installed, then autoremove:

sudo apt-mark auto debhelper dh-python faad flac libc-bin oggz-tools pypy pypy-hypothesis pypy-pytest python-all python-docutils python-hypothesis python-pycodestyle python-pyflakes python-pytest python2.7-doc python3-all python3-hypothesis python3-pycodestyle python3-pyflakes python3-pytest python3-sphinx python3-sphinx-rtd-theme python3.7-doc vorbis-tools
sudo apt autoremove
  • Thanks! apt showsrc mutagen/apt install python3-mutagen works just right. Only vorbis-tools got autoremoved from my longish Build-Depends list. All the other packages are either Unable to locate or not found by glob/regex Does it look right? – Alexey Orlov Mar 24 at 12:03
  • That looks OK; I’d have to know exactly what apt-src install did on your system to say conclusively. Since apt install works, at least your packages are consistent which means your system isn’t broken ;-). – Stephen Kitt Mar 24 at 12:08
  • The system does not appear to be broken, indeed. Let's consider he problem to be solved. Thank you very much! – Alexey Orlov Mar 24 at 12:13

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.