Score:0

Missing dependency of "python" after upgrade to Ubuntu 22.04 LTS

fm flag

I've recently upgraded a machine from Ubuntu 18 LTS to 22 LTS. This has remove a package that depends on "python" and "python-yaml". I've tried to reinstall that package but it complains about unresolvable dependencies.

root@mu-docker44:~# apt install clever-web
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 clever-web-3.18 : Depends: python but it is not installable
                Depends: python-yaml but it is not installable
E: Unable to correct problems, you have held broken packages.

Ubuntu 22 has been updated with python3 installed. I've also tried with installing "python-is-python3" as a resolver, but that did not change anything besides i can execute "python" on the commandline.

FedKad avatar
cn flag
There is no such package: https://packages.ubuntu.com/search?keywords=clever-web&searchon=names&suite=all&section=all Probably your `/etc/apt/sources*` files are corrupt.
Score:0
vn flag

This seems rather straightforward, but some things I can only assume.

  1. You have installed a package called clever-web-3.18. You didn't specify from where and how, but it's safe to assume it's not from any official Ubuntu Repository (since this package can't be found here).

  2. This package is dependent on a package called python, but this is not a package name found in Ubuntu repos either (the Python 2 package is called python2).

So a number of problems are present here:

  • You have installed an "unknown" package with problematic dependencies.
  • It is most likely depending on an old version of Python, that is completely deprecated and unsupported.
  • As such, it's also unlikely that anyone here can help you (since it's a unique and unsupported usecase).

Please clarify your question if you can elaborate on any of the points. But it seems that the dependencies of the package clever-web are simply incompatible with current versions of Ubuntu.

The correct way to move forward here would most likely be to build the package you want (clever-web) from source with the correct dependencies - but this will be another question (which I for one cannot answer).

A "dirty hack" might be to install the package without any dependencies. This is done by downloading the package file:

wget https://any.url.here/clever-web.deb

Now install the package with the dpkg tool instead of apt:

dpkg -i ./clever-web.deb

This may or may not work. And in this case, you probably also need python-is-python3 installed as you mention.

FedKad avatar
cn flag
Is it `python2` or `python3` !?
Artur Meinild avatar
vn flag
How would I know? I can only see the package in the OP's question is depending on `python`, which is not a package name in Ubuntu repos. We don't know more until the OP elaborates. However, if it was dependent on Python 3 there would not be a problem, so the dependency must be to the "old" Python - where I know only Python 2.
FedKad avatar
cn flag
OK. I thought that `pyhton2` is not installable on 22.04.
T-Regex avatar
fm flag
Yes, this is an unofficial package. It contains some code to process a YAML configuration file. The package has worked von Ubuntu LTS 18 without a problem, but since LTS 20 (even von LTS 22) not. So something must have changed. The code depends von python2, but it could run with python3 also. I was looking for a way to somehow install the package without caring about the dependencies given in the package information.
Artur Meinild avatar
vn flag
@T-Regex that's how Ubuntu works. For each new release you must rebuild the packages to have correct dependencies, which clear hasn't been done here. But I added a dirty hack to my answer, which may or may not work.
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.