Score:-2

Can't uninstall package, trying to "overwrite" a file

eg flag

I'm trying to uninstall the package 'gtk2-devel' (a CentOS package that I converted to DEB) using Ubuntu Software, but I get this error:

Unable to remove gtk2-devel:
Error while installing package: trying to overwrite '/usr/bin/gtk-builder-
convert', which is also in package gtk2-devel 2.24.31-2

How do I fix this?

guiverc avatar
cn flag
What OS & release are you using? The package clash is with a *debian* package, not a Ubuntu package (https://packages.debian.org/stretch/libgtk2.0-dev).
Etcetera avatar
eg flag
@guiverc I am using Ubuntu 21.04
N0rbert avatar
zw flag
https://packages.ubuntu.com/focal/libgtk2.0-dev
Etcetera avatar
eg flag
@N0rbert Installing it gives me the same error.
karel avatar
sa flag
Does this answer your question? [dpkg error: "trying to overwrite file, which is also in..."](https://askubuntu.com/questions/176121/dpkg-error-trying-to-overwrite-file-which-is-also-in)
Score:4
zw flag

To resolve your current situation run the commands below:

sudo dpkg --purge --force-all gtk2-devel
sudo dpkg --configure -a
sudo apt-get install -f

and then install normally available development package for Gtk2+:

sudo apt-get update
sudo apt-add-repository universe
sudo apt-get install libgtk2.0-dev

Please do not invent RPM-based abstractions on top of normal mature and fully functional APT system. Next time please visit https://packages.ubuntu.com/ first to prevent such situations.

Stuff to read:

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.