1

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?

David42
  • 111
  • 1
  • Are you sure you need the python2 libraries for gtk2 and not the python3 libraries of gtk2? – Archisman Panigrahi Dec 03 '22 at 21:30
  • 1
    @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. – David42 Dec 04 '22 at 00:14

0 Answers0