Score:1

Impossible to install libudev-dev on Ubuntu 22.04

cn flag
sudo apt install libudev-dev

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:
 libudev-dev : Depends: libudev1 (= 249.11-0ubuntu3) but 249.11-0ubuntu3.4 is to be installed
E: Unable to correct problems, you have held broken packages.

I couldn't find any solution. Some answers say "upgrade everything and it will work", but I have upgraded right now (2 hours ago) and the error remains. It says I have held broken packages, but sudo apt-mark showhold shows nothing (empty list).

I just need to install libudev-dev, any version. Suggestions, please?

apt policy libudev-dev && apt policy libudev1
libudev-dev:
  Installed: (none)
  Candidate: 249.11-0ubuntu3
  Version table:
     249.11-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
libudev1:
  Installed: 249.11-0ubuntu3.4
  Candidate: 249.11-0ubuntu3.4
  Version table:
 *** 249.11-0ubuntu3.4 100
        100 /var/lib/dpkg/status
     249.11-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Here is my cat /etc/apt/sources.list - just one line, this is after following the suggestion to delete this file, run "Software & Updates" and tick all the checkboxes:

cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu jammy main universe restricted multiverse
Pilot6 avatar
cn flag
Run `sudo apt update` and try again. If it doesn't work please add output of `apt policy libudev-dev && apt policy libudev1` to your question. The versions look wrong.
Violet Giraffe avatar
cn flag
@Pilot6: thanks for looking into it, I have added the policy output. I have run `apt update`, `apt upgrade` and rebooted at least 20 times in the last 4 hours.
Score:3
cn flag

You have disabled jammy-updates repository.

You did something wrong with the /etc/apt/sources.list file.

You can revert to the default one by deleting it and then enabling all repositories in Software & Updates.

You also need to enable all updates at the "Updates" tab.

The problem is that jammy-updates used to be enabled before and package versions do not match.

Violet Giraffe avatar
cn flag
I did as you said, then ran `update && upgrade`, but the error message when installing `libudev-dev` didn't change. `apt policy` output also seems to be the same. Is reboot required after wiping `/etc/apt/sources.list`? I did not reboot.
Violet Giraffe avatar
cn flag
I have 4 checkboxes ticked in "Software & Updates" (all except "Sources"), but only one line in `/etc/apt/sources.list`, is that normal?
Pilot6 avatar
cn flag
No, you don't need a reboot. Simply `sudo rm /etc/apt/sources.list`, then start software and & updates and click on all repos at the first tab, except source code. Then it should work
Pilot6 avatar
cn flag
Please add output of `cat /etc/sources.list` to the question.
Violet Giraffe avatar
cn flag
Done, question updated at the bottom.
Pilot6 avatar
cn flag
you also need to change the Updates tab. Select all updates. You need to have `jammy-updates` in the file.
Violet Giraffe avatar
cn flag
Wow, thank you very much! That did the trick. I didn't realize that setting exists.
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.