Score:0

Attempt to install/upgrade using apt fails due to not being able to remove spacewalk

vn flag

I recently upgrade to Ubuntu 20.04.

Running and apt install command returns an error, posted below. Too my understand of the error apt tries to remove apt-transport-spacewalk but fails.

How can I successfully remove this apt-transport-spacewalk program? Or, instead, how can I stop apt from trying to uninstall it, so that I can install the programs I need?

Stack trace:

sudo apt install apt-transport-spacewalk
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-spacewalk is already the newest version (1.0.6-4.1).
The following packages will be REMOVED:
  apt-transport-spacewalk
0 upgraded, 0 newly installed, 1 to remove and 326 not upgraded.
1 not fully installed or removed.
After this operation, 92.2 kB disk space will be freed.
Do you want to continue? [Y/n] Y
/usr/share/apt-listchanges/apt_listchanges.py:540: FutureWarning: Possible nested set at position 25
  email_re = re.compile(r'([a-zA-Z0-9_\+\-\.]+)@(([[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)')
(Reading database ... 150063 files and directories currently installed.)
Removing apt-transport-spacewalk (1.0.6-4.1) ...
mv: cannot stat '/etc/apt/apt.conf.d/50spacewalk': No such file or directory
dpkg: error processing package apt-transport-spacewalk (--remove):
 installed apt-transport-spacewalk package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 apt-transport-spacewalk
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
user535733 avatar
cn flag
1) Create the missing file: `touch /etc/apt/apt.conf.d/50spacewalk`. 2) Let apt remove the package. Then 3) Fix the `326 not upgraded`. Finally, 4) Reinstall the package.
vn flag
@user535733 This fixed it. Thank you!
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.