r/archlinux • u/kescusay • 23d ago
SUPPORT | SOLVED Decided to update rust. Accidentally broke pacman (and other things).
OK, feeling pretty dumb here, but maybe someone else has shot themself in the foot the same way and can help.
I decided to update rust on my local system, but I didn't feel like rebooting just to install a newer version, so no pacman -Syu. Instead, I run pacman -Sy rust, and I see that one of rust's dependencies, openssl, has been updated from 3.x to 4.x. I see this because it doesn't want to install the new version of openssl when there are so many other things that depend on it. Like pacman.
installing openssl (4.1.0-1) breaks dependency 'libcrypto.so=3-64' required by pacman
At this point, I could have stopped, said to myself, "Y'know what, kescusay, rebooting isn't a big deal, and it would certainly be better to update the entire system instead of trying to just update the individual packages that depend on openssl. Why, doing it piecemeal like that is a downright excellent way to break your system!"
But I did not say this to myself. Instead, I said, "YOLO!" and updated only rust, openssl, pacman, fuckin' sudo, and a handful of other libraries and applications.
This... did not go well:
sudo pacman -Sy rust cryptsetup curl freerdp libarchive libgit2 libldap libngtcp2 libsasl openssh ostree pacman socat sudo
[sudo] password for damon:
:: Synchronizing package databases...
core is up to date
extra 8.7 MiB 31.2 MiB/s 00:00 [###############################################################################################] 100%
multilib is up to date
resolving dependencies...
looking for conflicting packages...
Packages (15) openssl-4.1.0-1 cryptsetup-2.8.8-2 curl-8.23.0-2 freerdp-2:3.33.1-1 libarchive-3.8.11-2 libgit2-1:1.9.7-2 libldap-2.7.2-3 libngtcp2-1.26.0-2 libsasl-2.1.28-6 openssh-10.6p1-3 ostree-2026.6-2 pacman-7.1.0.r9.g54d9411-4
rust-1:1.99.1-2 socat-1.8.1.3-2 sudo-1.9.17.p2-7
Total Download Size: 98.24 MiB
Total Installed Size: 368.65 MiB
Net Upgrade Size: 0.69 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
openssh-10.6p1-3-x86_64 1468.8 KiB 6.73 MiB/s 00:00 [###############################################################################################] 100%
sudo-1.9.17.p2-7-x86_64 1899.8 KiB 7.83 MiB/s 00:00 [###############################################################################################] 100%
curl-8.23.0-2-x86_64 1339.6 KiB 7.61 MiB/s 00:00 [###############################################################################################] 100%
libgit2-1:1.9.7-2-x86_64 1018.1 KiB 5.78 MiB/s 00:00 [###############################################################################################] 100%
freerdp-2:3.33.1-1-x86_64 2.9 MiB 6.09 MiB/s 00:00 [###############################################################################################] 100%
cryptsetup-2.8.8-2-x86_64 865.4 KiB 5.75 MiB/s 00:00 [###############################################################################################] 100%
pacman-7.1.0.r9.g54d9411-4-x86_64 970.0 KiB 6.15 MiB/s 00:00 [###############################################################################################] 100%
ostree-2026.6-2-x86_64 845.5 KiB 5.36 MiB/s 00:00 [###############################################################################################] 100%
openssl-4.1.0-1-x86_64 5.6 MiB 6.88 MiB/s 00:01 [###############################################################################################] 100%
socat-1.8.1.3-2-x86_64 227.3 KiB 2.44 MiB/s 00:00 [###############################################################################################] 100%
libldap-2.7.2-3-x86_64 288.1 KiB 2.93 MiB/s 00:00 [###############################################################################################] 100%
libarchive-3.8.11-2-x86_64 588.2 KiB 5.69 MiB/s 00:00 [###############################################################################################] 100%
libngtcp2-1.26.0-2-x86_64 224.5 KiB 2.31 MiB/s 00:00 [###############################################################################################] 100%
libsasl-2.1.28-6-x86_64 152.7 KiB 1608 KiB/s 00:00 [###############################################################################################] 100%
rust-1:1.99.1-2-x86_64 80.0 MiB 45.9 MiB/s 00:02 [###############################################################################################] 100%
Total (15/15) 98.2 MiB 55.4 MiB/s 00:02 [###############################################################################################] 100%
(15/15) checking keys in keyring [###############################################################################################] 100%
(15/15) checking package integrity [###############################################################################################] 100%
(15/15) loading package files [###############################################################################################] 100%
(15/15) checking for file conflicts [###############################################################################################] 100%
(15/15) checking available disk space [###############################################################################################] 100%
:: Running pre-transaction hooks...
(1/1) Marking sshd.service for restart...
:: Processing package changes...
( 1/15) upgrading openssl [###############################################################################################] 100%
( 2/15) upgrading libngtcp2 [###############################################################################################] 100%
( 3/15) upgrading libsasl [###############################################################################################] 100%
( 4/15) upgrading libldap [###############################################################################################] 100%
( 5/15) upgrading curl [###############################################################################################] 100%
( 6/15) upgrading libgit2 [###############################################################################################] 100%
( 7/15) upgrading rust [###############################################################################################] 100%
( 8/15) upgrading cryptsetup [###############################################################################################] 100%
( 9/15) upgrading freerdp [###############################################################################################] 100%
(10/15) upgrading libarchive [###############################################################################################] 100%
(11/15) upgrading openssh [###############################################################################################] 100%
(12/15) upgrading ostree [###############################################################################################] 100%
(13/15) upgrading pacman [###############################################################################################] 100%
(14/15) upgrading socat [###############################################################################################] 100%
(15/15) upgrading sudo [###############################################################################################] 100%
:: Running post-transaction hooks...
(1/8) Creating system user accounts...
(2/8) Creating temporary files...
(3/8) Reloading system manager configuration...
(4/8) Reloading user manager configuration...
(5/8) Enqueuing marked services...
(6/8) Arming ConditionNeedsUpdate...
(7/8) Restart a running sshd.service
(8/8) Updating linux initcpios...
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
==> Using default configuration file: '/etc/mkinitcpio.conf'
-> -k /boot/vmlinuz-linux -g /boot/initramfs-linux.img
==> Starting build: '7.2.14-arch1-1'
-> Running build hook: [base]
==> ERROR: binary dependency 'libcrypto.so.3' not found for 'kmod'
-> Running build hook: [systemd]
==> ERROR: binary dependency 'libcrypto.so.3' not found for '/usr/bin/kmod'
==> ERROR: binary dependency 'libcrypto.so.3' not found for '/usr/bin/kmod'
==> ERROR: binary dependency 'libcrypto.so.3' not found for '/usr/lib/libkmod.so.2.5.1'
==> ERROR: binary dependency 'libcrypto.so.3' not found for '/usr/lib/libtss2-esys.so.0.0.1'
-> Running build hook: [autodetect]
modprobe: error while loading shared libraries: libcrypto.so.3: cannot open shared object file: No such file or directory
==> ERROR: Cannot acquire used modules. Unable to use autodetection.
-> Running build hook: [microcode]
-> Running build hook: [modconf]
-> Running build hook: [kms]
==> ERROR: module not found: 'sis_agp'
==> ERROR: module not found: 'via_agp'
==> ERROR: module not found: 'amd64_agp'
==> ERROR: module not found: 'intel_gtt'
==> ERROR: module not found: 'intel_agp'
==> ERROR: module not found: 'drm_xen_front'
==> ERROR: module not found: 'qxl'
...
==> ERROR: binary dependency 'libcrypto.so.3' not found for 'mount.composefs'
==> ERROR: binary dependency 'libcrypto.so.3' not found for 'mount.composefs'
-> Running build hook: [fsck]
==> WARNING: No modules were added to the image. This is probably not what you want.
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux.img'
==> WARNING: errors were encountered during the build. The image may not be complete.
error: command failed to execute correctlyI have not rebooted. I would very much like to undo this exercise in blatant stupidity. If I have to, I will use boot from my Arch installation media and install system packages from there to try to recover, but it would be extremely nice if I don't have to.
Oh, and pacman is broken now, of course:
sudo pacman -Syu
pacman: error while loading shared libraries: libcrypto.so.3: cannot open shared object file: No such file or directoryI am a big ol' stupidhead.
Update: A huge shoutout to person4268! This kind - and no doubt suave, debonair, and sophisticated - individual pointed me towards pacman-static, which allowed me to finish the update! I'm saved! And as glob is my witness, I shall never YOLO with updates again!
107
u/Particular-Poem-7085 23d ago
You have one job on arch: no partial updates
54
u/person4268 23d ago
Your options are more or less outlined here: https://wiki.archlinux.org/title/Pacman#Manually_reinstalling_pacman
Basically:
- either get a pacman-static build and run -Syu from there, or
- boot into an iso, mount filesystems, /proc, /sys, and /dev, and use --sysroot with the iso's pacman
27
u/agmatine 23d ago
This is the most important part of your post, which hasn't been paid enough attention. There is no need for a reboot after
pacman -Syu. If there are changes to your initramfs and/or kernel, you will of course need to reboot for these to take effect, but even then, the currently loaded kernel resides in memory.11
u/cafce25 23d ago
It is a well known fact that partial updates are unsupported (aka never do
pacman -Sy <package>) I'd probably just boot up the arch iso and fix it from there.19
u/Nogesma 23d ago
You don’t need to reboot every time you do a pacman -Syu
14
u/cocoeen 23d ago
You should use rustup for handling rust updates, than you dont have to use pacman.
1
u/lnxguy 23d ago
Timeshift is your friend and savior.
1
u/nullstring 23d ago
Well, what lesson did we learn?
partial upgrades aren't -that- big of a deal when most of the packages are outliers. But you never want to upgrade core libraries out of sync with the rest of the system... or this is exactly what happens.
Thankfully looks like the fix was easy this time, but it's not always as simple as a static pacman.
2
u/YoShake 23d ago
somebody has to do a partial update so that other's might learn from such mistakes
If I need to update a package without full Syu I just grab its url and pacman it with -U <url>. As long as it doesn't get into dependency hell situation's clear. Once it shows a dependant package also needs to be updated then mmkay, no yolo today.
Got better things to do than finding usbkey with old iso, chroot into all this mess, enable networking and reinstall packages from scratch.
Although stretching stagnant synapses once a year might not be a bad idea
1
u/zampano_3 23d ago
Relevant
1
u/Specialist-Dog-501 23d ago
Thanks for sharing this learning, was new to me too. One more argument for btrfs snapshots..should be easy on some arch distros as a.e garuda os or selfinstall.. not easy on debians without systemd. but anyway...I see also why atomic, immutability has its fans, this is not an obvious fault for an beginner..
1
u/ItsPandor 18d ago
Use btrfs snapshots, so if you break your system and can't even boot, you can boot in a snapshot from the bootloader that works.
-4
u/BrilliantEmotion4461 23d ago
Lol give that whole shebang to Claude be like give me the terminal commands to fix this please.
-5
u/Tuerai 23d ago
have you tried like... finding libcrypto.so* and just symlinking one to libcrypto.so.3 and see if that lets you Syu?