Debian 10 -> 12 botched - trying to fix

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
lebca
Posts: 2
Joined: 2024-11-18 17:44

Debian 10 -> 12 botched - trying to fix

#1 Post by lebca »

Hi all,

I made two silly mistakes that have resulted in broken dependencies and broken boot state:
- tried to upgrade distros without ensuring all packages were up-to-date first
- tried to go directly from buster to bookworm

The result is:

Code: Select all

root@finnix:/# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libc-bin : Depends: libc6 (< 2.29) but 2.36-9+deb12u1 is installed
 libc-dev-bin : Depends: libc6 (< 2.29) but 2.36-9+deb12u1 is installed
 libc6-dev : Depends: libc6 (= 2.28-10+deb10u2) but 2.36-9+deb12u1 is installed
 locales : Depends: libc-bin (> 2.36) but 2.28-10+deb10u2 is installed
 openssh-server : Depends: openssh-client (= 1:9.2p1-2) but 1:7.9p1-10+deb10u2 is installed
                  Depends: runit-helper (>= 2.14.0~) but it is not installed
                  Depends: libcrypt1 (>= 1:4.1.0) but it is not installed
                  Depends: libselinux1 (>= 3.1~) but 2.8-1+b1 is installed
                  Depends: libssl3 (>= 3.0.8) but it is not installable
                  Recommends: xauth but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
I have tried resetting the sources.list back to buster, back to bookworm, and also bullseye. I have tried installing specific versions of the packages erroring in the above log, e.g.
apt-get install libc6/bullseye locales/bullseye libc6-dev/bullseye libc-dev-bin/bullseye libgcc-s1/bullseye
or pinning them to a version like
apt-get install libc6=2.28-10 locales=2.28-10 libc-dev-bin=2.28-10 libgcc-s1=2.28-10
I've tried running
apt --fix-broken install
which fails with:

Code: Select all

/usr/bin/python3: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
E: Sub-process /usr/bin/apt-listchanges --apt || test $? -lt 10 returned an error code (1)
E: Failure running script /usr/bin/apt-listchanges --apt || test $? -lt 10
Any suggestions on how to fix my situation? I understand that wiping the disk and starting from scratch would be the best. Curious if there is any way to recover with the data and programs (DBes) installed, ie rolling back to buster or working through upgrade process to bullseye/bookworm.

User avatar
Uptorn
Posts: 423
Joined: 2022-01-22 01:07
Has thanked: 331 times
Been thanked: 112 times

Re: Debian 10 -> 12 botched - trying to fix

#2 Post by Uptorn »

Curious if there is any way to recover with the data and programs
Much of it is contained in
  • .cache
  • .local
  • .config
Web browsers have their own hidden directories.

User avatar
bw123
Posts: 4056
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 33 times

Re: Debian 10 -> 12 botched - trying to fix

#3 Post by bw123 »

you didn't show the complete output from apt --fix-broken install?

You're probably close, and need --dist-upgrade or --full-upgrade

After a big screw up like this, I would always be suspicious of the system, so I would just reinstall bookworm. Just a personal pref, I don't like unknowns nagging my attention every time there is an issue.

good luck,
bw

lebca
Posts: 2
Joined: 2024-11-18 17:44

Re: Debian 10 -> 12 botched - trying to fix

#4 Post by lebca »

Thank you for the replies!

This is the output to
apt --fix-broken install

Code: Select all

Reading package lists...
Building dependency tree...
Reading state information...
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  dictionaries-common emacsen-common ftp iamerican ibritish ienglish-common
  ispell javascript-common libicu63 libjs-jquery libjs-sphinxdoc
  libjs-underscore libpython2-stdlib linux-libc-dev openssh-sftp-server
  python-all python-pkg-resources python-setuptools python-six python2
  python2-minimal python3-requests-toolbelt python3-virtualenv virtualenv
  Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-10 gcc gcc-10
  gcc-10-base libasan6 libatomic1 libbinutils libcc1-0 libcrypt1 libctf-nobfd0
  libctf0 libffi7 libgcc-10-dev libgomp1 libisl23 libitm1 liblsan0 libnsl2
  libpython2-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib
  libquadmath0 libreadline8 libtsan0 libubsan1 python-all python-pkg-resources
  python-setuptools python-six python2 python2-minimal python2.7
  python2.7-minimal
Suggested packages:
  binutils-doc cpp-doc gcc-10-locales gcc-multilib autoconf automake libtool
  flex bison gdb gcc-doc gcc-10-multilib gcc-10-doc python-setuptools-doc
  python2-doc python-tk python2.7-doc binfmt-support
Recommended packages:
  libc6-dev | libc-dev libc6-dev
The following packages will be REMOVED:
  build-essential g++ g++-6 g++-8 libc-bin libc-dev-bin libc6-dev
  libexpat1-dev libpython-all-dev libpython-dev libpython-stdlib
  libpython2-dev libpython2.7-dev libstdc++-6-dev libstdc++-8-dev locales
  openssh-server python python-all-dev python-apt python-asn1crypto
    python-cffi-backend python-chardet python-configparser python-crypto
  python-cryptography python-dbus python-debian python-debianbts python-dev
  python-entrypoints python-enum34 python-gi python-httplib2 python-ipaddress
  python-keyring python-keyrings.alt python-minimal python-pip python-pycurl
  python-pyicu python-pysimplesoap python-reportbug python-secretstorage
  python-support python-virtualenv python-wheel python-xdg python2-dev
  python2.7-dev task-english task-ssh-server
The following NEW packages will be installed:
  cpp-10 gcc-10 gcc-10-base libasan6 libcrypt1 libctf-nobfd0 libctf0 libffi7
  libgcc-10-dev libisl23 libnsl2 libreadline8
The following packages will be upgraded:
  binutils binutils-common binutils-x86-64-linux-gnu cpp gcc libatomic1
  libbinutils libcc1-0 libgomp1 libitm1 liblsan0 libpython2-stdlib
  libpython2.7 libpython2.7-minimal libpython2.7-stdlib libquadmath0 libtsan0
  libubsan1 python-all python-pkg-resources python-setuptools python-six
  python2 python2-minimal python2.7 python2.7-minimal
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  libc-bin
26 upgraded, 12 newly installed, 52 to remove and 360 not upgraded.
4 not fully installed or removed.
Need to get 0 B/45.4 MB of archives.
After this operation, 75.7 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 
Regarding the .cache .local and .config I'll snoop around for those too.

jmgibson1981
Posts: 354
Joined: 2015-06-07 14:38
Has thanked: 18 times
Been thanked: 49 times

Re: Debian 10 -> 12 botched - trying to fix

#5 Post by jmgibson1981 »

Its funny. Sometimes what seems like a valid shortcut bites us in the ass. While Im curious to see it fixed I agree with the fresh installation suggestion to avoid any future random unknown issues that may pop up.

arzgi
Posts: 1614
Joined: 2008-02-21 17:03
Location: Finland
Has thanked: 1 time
Been thanked: 85 times

Re: Debian 10 -> 12 botched - trying to fix

#6 Post by arzgi »

jmgibson1981 wrote: 2024-12-14 00:36 Its funny. Sometimes what seems like a valid shortcut bites us in the ass. While Im curious to see it fixed I agree with the fresh installation suggestion to avoid any future random unknown issues that may pop up.
+1

Trying to upgrade skipping a release between, does not work out. And always before upgrading good habit is to do backup of important files.

Post Reply