I got a new laptop for work and now destroyed it lol I installed Debian 11 with LVM and everything I needed.
How I ended up in this situation
Everything was perfect, except for my docking station setup. Very long story short: I tried seemingly everything, but I couldn't get the DisplayLink setup to work with my laptop and two external monitors, even though my co-worker could, using the same exact hardware.
I had one screen only having interlaced as the highest resolution and I found out, that DisplayLink shouldn't be necessary at all anymore, so I tried upgrading to Kernel version 5.18.0-3-amd64
, because I read it has more support in these fields.
I followed this guide.
It didn't get my third monitor to work, but now I could use the highest resolution without interlaced. That was good enough for me.
Though, I noticed whenever I wanted to install something with apt, it caused some issues. I just tried to uncomment the Debian unstable sources and it would work lol
But now? apt tried to uninstall a LOT. It wanted to remove half a giga byte.
I googled, found out it shouldn't be, looked a bit through and among it was gnome and other essential stuff. I aborted ofc and figured it's the kernel upgrade (since the newest supplied from debian was 5.10.0-16-amd64
)
I tried to find a guide to downgrade. I ran "apt install --fix-broken
", rebooted into the old kernel that was still installed and I found myself in a console, not a desktop environment. All of theses packages got uninstalled :)
Now I can't install anything, not even with dpkg. Could dpkg's database be broken?
Also: I installed linux-headers-5.18.0-3-common_5.18.14-1_all.deb
and all its dependencies manually with dpkg, because they were necessary for VirtualBox and I couldn't get it to work with apt whatsoever, so I just tried this and it worked. I don't know if that could interfere somehow.
The error
I searched, tried, etc. but absolutely no clue what to do now. Anything I try in terms of installing/upgrading results in this:
The following packages have unmet dependencies:
libtext-charwidth-perl: Depends: perlapi-5.34.0 but it is not installable
libtext-iconv-perl: Depends: perlapi-5.34.0 but it is not installable
perl: Breaks: perl-modules-5.24 but 5.24.1-3+deb9u7 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I honestly don't even get what that's supposed to mean. The more I research, the more I get confused. I don't even know what to Google at this point.
What I tried
downgrading. I think that's what I have to do, but idk how. I looked for something that downgrades all packages into an installable version (e.g. to Debian 11 released standards), but couldn't find anything close to it. I can only find tutorials that all say "package=version". I googled the packages and perlapi is a virtual package that comes from perl-base, so I tried to install the version 5.34.0 via apt and also via wget of https://packages.debian.org/sid/amd64/perl-base/download and dpkg -i
But apt says:
E: Version '5.34.0' for 'perl-base' was not found
I mean... it said it couldn't install it, but some forum solutions said to just manually install it. I don't even know why it wants this version to begin with. I am using kernel 5.10 with standard apt sources (tried everything with added and removed extra sources):
deb http://packages.hs-regensburg.de/debian/ bullseye main contrib non-free
deb-src http://packages.hs-regensburg.de/debian/ bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian unstable main contrib non-free
deb-src http://deb.debian.org/debian unstable main contrib non-free
And dpkg says:
dpkg: regarding perl-base_5.34.0-5_amd64.deb containing perl-base:
perl-base breaks libfile-spec-perl (<< 3.8000)
perl provides libfile-spec-perl and is present and installed.
dpkg: error processing archive perl-base_5.34.0-5_amd64.deb (--install):
instaling perl-base would break perl, and
deconfiguration is not permitted (--auto-deconfigure might help)
Errors were encountered while processing:
perl-base_5.34.0-5_amd64.deb
--auto-deconfigure didn't help
I'm not sure anymore what even the problem is at this point. I am utterly lost. Please help <:C Please keep in mind, that I can't install anything and "re-installing Debian" is not an option. I didn't all the time to just do it again. If you need anything, ask and I'll try to provide
Update
I managed to send text via SSH and putty on Windows (typed everything before).
Here is additional information: https://pastebin.com/XNKLMRkB
Update 2
I came up with this unfinished apt command, trying to resolve these dependency issues:
apt install libtext-charwidth-perl=0.04-10+b1 perl-base=5.32.1-4+deb11u2 libtext-iconv-perl=1.7-7+b1 perl=5.32.1-4+deb11u2 perl-modules-5.32=5.32.1-4+deb11u2
This is what I get:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
perl is already the newest version (5.32.1-4+deb11u2).
perl-modules-5.32 is already the newest version (5.32.1-4+deb11u2).
perl-modules-5.32 set to manually installed.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
perl : Breaks: perl-modules-5.24 but 5.24.1-3+deb9u7 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
It somehow thinks it needs 5.24 from Debian 9 (like Stephen Kitt already pointed out. Thank you). I tried to simply use the newer version, block this version, make it negative priority, uninstall or somehow bypass it. Nothing worked :C I guess I'm one step behind. I Just need to know how to step forward.
dpkg error when tryin to uninstall:
dpkg: dependency problems prevent removal of perl-modules-5.24:
libmailtools-perl depends on libnet-perl; however:
Package libnet-perl is not installed.
Package perl-modules-5.24 which provides libnet-perl is to be removed.
Package perl which provides libnet-perl is not configured yet.
libmailtools-perl depends on libtest-simple-perl; however:
Package libtest-simple-perl is not installed.
Package perl-modules-5.24 which provides libtest-simple-perl is to be removed.
Package perl which provides libtest-simple-perl is not configured yet.
libmailtools-perl depends on libnet-perl; however:
Package libnet-perl is not installed.
Package perl-modules-5.24 which provides libnet-perl is to be removed.
Package perl which provides libnet-perl is not configured yet.
libmailtools-perl depends on libtest-simple-perl; however:
Package libtest-simple-perl is not installed.
Package perl-modules-5.24 which provides libtest-simple-perl is to be removed.
Package perl which provides libtest-simple-perl is not configured yet.
libhttp-date-perl depends on libtime-local-perl (>= 1.28); however:
Package libtime-local-perl is not installed.
Package perl-modules-5.24 which provides libtime-local-perl is to be removed.
Package perl which provides libtime-local-perl is not configured yet.
dpkg: error processing package perl-modules-5.24 (--remove):
dependency problems - not removing
Errors were encountered while processing:
perl-modules-5.24
When I try to configure all missing packages:
dpkg: dependency problems prevent configuration of perl:
perl depends on perl-base (= 5.32.1-4+deb11u2); however:
Version of perl-base on system is 5.34.0-5.
perl-base (5.34.0-5) breaks perl (<< 5.34.0~) and is installed.
Version of perl to be configured is 5.32.1-4+deb11u2.
dpkg: error processing package perl (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
perl
bullseye-backports
and/or use an LXC container to build in an separate and isolated environment. At this step I wouldn't write an answer because trying to follow it could result in a worse state. Either upgrade everything to bookworm and stick to it until it becomes Debian 12 (in 2023?) , or reinstall.