Score:1

Satisfy dependencies of python-gtk2 on Ubuntu 22.04

br flag

I am trying to install python-gtk2 on Ubuntu 22.04 like so:

$ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-6_amd64.deb
$ sudo dpkg -i python-gtk2_2.24.0-6_amd64.deb

However, this fails because python-gtk2 depends on Python 2, but in Ubuntu 22.04 the package has been renamed from "python" to "python2".

So I create a dummy package. Here is the control file:

Section: misc
Priority: optional
Standards-Version: 3.9.2
Package: python
Version: 2.7.18-3
Maintainer: Nobody <nobody@example.com>
Architecture: all
Description: Dummy package to provide python on Ubuntu 22.04

I build this package with equiv-build and install it. However, when I try again to install python-gtk2, it still fails the dependency check:

sudo dpkg -i Territory_Editor/src/python-gtk2_2.24.0-6_amd64.deb 
(Reading database ... 430347 files and directories currently installed.)
Preparing to unpack .../python-gtk2_2.24.0-6_amd64.deb ...
Unpacking python-gtk2 (2.24.0-6) over (2.24.0-6) ...
dpkg: dependency problems prevent configuration of python-gtk2:
 python-gtk2 depends on python:any (>= 2.6.6-7~).

dpkg: error processing package python-gtk2 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python-gtk2

I'm stumped. Why does my dummy package not satisfy the dependency?

us flag
Are you sure you need the python2 libraries for gtk2 and not the python3 libraries of gtk2?
David42 avatar
br flag
@Archisman Panigrahi Yes, I need to install the python2 libraries. It is for a program I wrote a few years ago and still occasionally need to use. If I install it --force-dependencies it works, but then apt wants to remove it every time I try to install anything else.
I sit in a Tesla and translated this thread with Ai:

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.