Score:0

why it is impossible to install libsdl2-dev on ubuntu 20.04? Or is there some way to fix that problem?

in flag

[I have absolutely no idea how focal-updates got removed, but following the dup question directions, I just added this line deb http://br.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse to sources.list and ran sudo apt-get update and libsdl2-dev became installable properly thru synaptic]


here is the problem

$ sudo apt install libsdl2-dev
libsdl2-dev : Depends: libasound2-dev but it is not going to be installed
$ sudo apt install libasound2-dev
libasound2-dev : Depends: libasound2 (= 1.2.2-2.1)
$ sudo apt install libasound2
libasound2 is already the newest version (1.2.2-2.1ubuntu2).

how to install it now? is it really impossible!?

If it is impossible, I was thinking on downloading every libsdl2-dev dependency tree, extract the packages and just point the compiler to such folder, I think it could work.
But that is also a huge problem, because I would have to grab each package individually, as I cant find a way to just ask them to be downloaded w/o installing :(
Any better idea? Any easier way to do a thing that should be simple?
I cant compile the SDL2 project locally now, I cant test it, ahhh...
Is the only other/simple option to grab the sources and compile them from official site?


here the requested info

$ grep -r ^deb /etc/apt/ --include=*.list
/etc/apt/sources.list.d/nodesource.list:deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x focal main
/etc/apt/sources.list.d/nodesource.list:deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x focal main
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://br.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security multiverse

$ sudo apt-get update
Hit:1 http://br.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease                                         
Hit:3 https://deb.nodesource.com/node_16.x focal InRelease
Reading package lists... Done

$ apt-cache policy libsdl2-dev
libsdl2-dev:
  Installed: (none)
  Candidate: 2.0.10+dfsg1-3
  Version table:
     2.0.10+dfsg1-3 500
        500 http://br.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

$ apt policy libasound2
libasound2:
  Installed: 1.2.2-2.1ubuntu2
  Candidate: 1.2.2-2.1ubuntu2
  Version table:
 *** 1.2.2-2.1ubuntu2 100
        100 /var/lib/dpkg/status
     1.2.2-2.1 500
        500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages

hr flag
Is the package catalog fully up to date (`sudo apt update`)?
in flag
@steeldriver to be sure, I just ran the update again but got the same results when trying to install libsdl2-dev and the others
Terrance avatar
id flag
Do you have any extra repositories setup on your system that might conflict with this installation? I just tested the installation on my 20.04 for the libsdl2-dev and it installed without any issues. I have in my Software and Settings the Main, Universe, Restricted and Multiverse repositories all enabled.
user535733 avatar
cn flag
The key to the puzzle is `libasound2 is already the newest version (1.2.2-2.1ubuntu2)` because that statement is not true. That's not the newest version available for 20.04. Not even close. Therefore either your sources are mucked up or you are ignoring `update` errors.
user10489 avatar
in flag
My Ubuntu 20.04 system is currently showing libasound2 1.2.2-2.1ubuntu2.5
N0rbert avatar
zw flag
Please show full output of `grep -r ^deb /etc/apt/ --include=*.list`; `sudo apt-get update`; `apt-cache policy libsdl2-dev`. I can't reproduce your problem on fresh 20.04 LTS system.
in flag
@N0rbert I updated many packages yesterday but could only turn it on today. Edited the OP with requested info. I just checked on synaptic and now there is no more available updates to install. @Terrance, it is good to know yours is working, so mine just needs fixing! @user10489 when I try to install libasound2 it still says `libasound2 is already the newest version (1.2.2-2.1ubuntu2).` even after all updates applied.
Organic Marble avatar
us flag
Please add the output of `apt policy libasound2` to your question.
Organic Marble avatar
us flag
OK, that is the smoking gun. The version of llbasound2 on your system did not come from any repository you have on your system now. Either you downloaded and installed it manually, or you installed it from a repo that is no longer on your system. You also don't have the focal-update repo on your system.
Organic Marble avatar
us flag
It is unlikely that this is the only problematic package on your system. To get an idea of what other ones might be 'orphaned' like this one, you can use synaptic and look at "installed (local or obsolete)" You will have to fix these packages one by one. If I had to fix this system, first I would clone the / drive (so I can get back to the original state when-not if-I mess it up). Then I would enable focal-updates. Then I would use synaptic and aptitude to install the proper version for each orphaned package.
in flag
@OrganicMarble there are 179 packages at "installed (local or obsolete)" and libasound2 is really one of them! I have a backup. But I dont understand how can my focal-updates be disabled? I will search about it thx. Btw, I downloaded this: http://security.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2-data_1.2.2-2.1ubuntu2.5_all.deb , but after installing it with gdebi it says `dependency problems - leaving unconfigured`. That package broke, trying to "fix broken packages" would want to remove a lot of packages, so I had to use `dpkg -i` on the previous version, as gdebi would not allow it
Organic Marble avatar
us flag
This is going to be painful and messy to fix. If you know what repository the packages came from originally, you could even try re-adding it and then doing a ppa-purge. After doing the clone of /
in flag
@OrganicMarble I felt that could be a huge problem.. as snapd used a huge amount of my old internet quota (100MB/day) making me unable to browse at all, I uninstalled it long ago. At synaptic, it should have the focal-updates option before snapd existing, now it is not there. It would be easier to just reinstall ubuntu20.04 right? I may just wait for ubuntu 22.04, tho. I will develop things after that. I think I got these old libasound2 from https://launchpad.net/ubuntu/+source/alsa-lib/1.2.2-2.1ubuntu2/+build/19854508 and installed manually using gdebi, not sure tho.
N0rbert avatar
zw flag
Your system misses `focal-updates` pocket. So you have to restore official repositories and then run `sudo apt-get update`, `sudo apt-get install aptitude`, `sudo aptitude dist-upgrade` .
in flag
@N0rbert I have absolutely no idea how `focal-updates` got removed, but following the dup question directions, I just added this line `deb http://br.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse` to `sources.list` and ran `sudo apt-get update` and `libsdl2-dev` became installable properly thru synaptic, thx vm!
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.