Score:0

The package python-incremental needs to be reinstalled, but I can't find an archive for it

za flag

I've been messing with Python installation and I messed it up completely. Now when I'm doing apt upgrade I always get following error.

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package python-incremental needs to be reinstalled, but I can't find an archive for it.

I've been trying many things that I found around but no luck so far.

$ sudo dpkg --remove python-incremental
dpkg: dependency problems prevent removal of python-incremental:
 python-twisted-core depends on python-incremental.

dpkg: error processing package python-incremental (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 python-incremental

$ sudo dpkg --remove python-twisted-core
dpkg: dependency problems prevent removal of python-twisted-core:
 deluge-common depends on python-twisted-core; however:
  Package python-twisted-core is to be removed.

dpkg: error processing package python-twisted-core (--remove):
 dependency problems - not removing
Errors were encountered while processing:
 python-twisted-core

$ sudo apt-get install --reinstall python-minimal python-lockfile
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package python-incremental needs to be reinstalled, but I can't find an archive for it.

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package python-incremental needs to be reinstalled, but I can't find an archive for it.

And many more...

Seems like APT is stuck by this issue and I have no idea how to continue. I'm on Ubuntu 20.04.3 LTS. Any ideas? Thanks.

vanadium avatar
cn flag
Never attempt to change the default python version - it is an essential part of the core system. Did you add PPA's? Try ppa-purging these (may also not work). A system reinstall may be the quickest option - you can do so without formatting the disk. Then your user configuration is preserved.
guiverc avatar
cn flag
A quick query on `python-incremental` shows it's available only for *bionic*, so I'd be checking why you need/installed it, and whether or not you need anything else associated with it (ie. depends rules)
piktor avatar
za flag
@vanadium Unfortunately these packages were not added from any PPA, I did dpkg -i on files downloaded from internet. Big mistake. So I suppose ppa-purge won't help there. I know how to do system reinstall but I was hoping there will be easier solution.
vanadium avatar
cn flag
Technically the easiest will be reinstall, most likely. A broken package system may require hand work to repair, and each case is unique.
user535733 avatar
cn flag
An easier solution may be to uninstall whatever packages you downloaded from the internet. One imagines the package names are in your terminal history.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.