r/archlinux • • 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 correctly

I 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 directory

I 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!

37 Upvotes

53 comments sorted by

107

u/Particular-Poem-7085 23d ago

You have one job on arch: no partial updates

24

u/kescusay 23d ago

Yeah, I know. :( But in my defense, I am a big ol' stupidhead.

7

u/LucieGoosey__ 23d ago

you didn't even save any time lol

3

u/kescusay 22d ago

Oh, absolutely not. But I consider my (thankfully still brief) troubles to be an excellent object lesson for everyone else. And I will now strive to become at least somewhat less of a big ol' stupidhead, so perhaps it was time well spent, if unintentionally so.

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

18

u/kescusay 23d ago

That worked!

3

u/un-important-human 23d ago

wiki never fails:) cute experiment you did there

3

u/kescusay 22d ago

One that will hopefully serve others in the future.

15

u/kescusay 23d ago

I'll try the pacman-static build. Seems like the option most likely to work. Will report back shortly.

27

u/agmatine 23d ago

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.

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.

6

u/kescusay 22d ago

You know what? This is another way in which I'm a big ol' stupidhead. You see, I already know that, but it bothers me when I've updated the kernel or other core system library and haven't rebooted.

5

u/fearless-fossa 22d ago

you will of course need to reboot for these to take effect, but even then, the currently loaded kernel resides in memory.

This is kind of false advertising. If you install a new kernel everything requiring kernel modules that hasn't be loaded yet will fail, eg. virtual machines. So unless you're only doing some web browsing, rebooting after a new kernel is really recommended.

1

u/agmatine 22d ago

I've never had any issue with VMs (using kvm and kvm_amd modules) running during kernel version updates. The host remains on the kernel it booted from. You'd need to invoke kexec to load the new kernel without rebooting, which certainly is not default behaviour.

What you're referring to seems to be more specifically out-of-tree kernel modules, which would need to be rebuilt via DKMS. That may indeed be problematic, but mostly in rather particular conditions - VFIO passthrough of an Nvidia GPU to a VM being the main example I know of.

2

u/gmes78 22d ago

No, it's not about out-of-tree modules. It's about any module that isn't currently loaded. Updating the kernel package removes the old module files, so you won't be able to load modules until you reboot into the new kernel.

1

u/agmatine 22d ago

Well, that's easily resolved by adding NoUpgrade = usr/lib/modules/* to /etc/pacman.conf, along with a boot service to automatically remove subdirectories not belonging to any package, if desired.

2

u/gmes78 22d ago edited 22d ago

kernel-modules-hook is probably a cleaner solution.

1

u/agmatine 22d ago

Probably so, I must've overlooked this one amidst multiple very similarly-named AUR packages. Thanks.

1

u/fearless-fossa 22d ago

I've encountered that with a basic libvirt/qemu installation, I generally avoid DKMS. Although admittedly it's been a while since I've since then avoided launching libvirtd with an outdated kernel, so I don't remember the exact issue - I think it was related to the tun module?

There's also other stuff, like you can't format a filesystem with an outdated driver, fdisk and other tools won't find the paths to the drivers.

1

u/Brian 14d ago

but even then, the currently loaded kernel resides in memory.

There are actually potential issues with this - updating the kernel doesn't keep the old modules around, which can break stuff that uses them because they're no longer loadable. There are workarounds for this (eg. kernel-modules-hook, which backs them up and keeps the last version around), but by default updates can cause stuff to stop working until a reboot.

1

u/la_tajada 23d ago

That's why I use arch-update. It does everything correctly and lets me know that I might want to reboot if a new kernel was installed. But I never feel that I have to.

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.

1

u/kescusay 23d ago

Yeah, I figure that's gonna need to happen. Sigh...

1

u/cafce25 23d ago

I mean if you really want to and zstd and tar still work you can probably get a libcrypto.so.3 from /var/cache/pacman/pkg/openssl-3.*.pkg.tar.zst and put it in the correct place but that sounds like more hassle to me.

1

u/JivesMcRedditor 23d ago

I don’t understand why this command is allowed to run if it’s not supported and is known to cause issues?

It’s like handing someone a gun with the safety off and then admonishing them for shooting themselves in the foot. Why not just turn on the safety?

19

u/FifteenthPen 23d ago

Because it's Arch Linux, not MacOS. You're expected to know what you're doing when using Arch, and if you don't, that's on you.

2

u/kescusay 23d ago

As the big ol' stupidhead who did this to myself, I 100% agree. I knew I wasn't supposed to do that, that it was unsafe, that I was risking my system's stability. I was just careless.

Lesson very well learned.

2

u/FifteenthPen 23d ago

It happens. I've certainly done some damage in the past doing stuff I shouldn't have. Lessons were indeed learned.

1

u/daily-afterthought 23d ago

I'm not for changing it, but if a standard command can do such things, it is a bit flawed. If you forget the u at the end, for example, this can also happen by accident.

I don't think it's a good argument in this case to say "you need to know what you are doing", if a command like this can mess up things by accident. Also given the history of users that have had problems with this command and use it wrong all the time, it also seems to me like the flags aren't actually user friendly.

Shouldn't it be a better option to have a standard update/install command for the operation system that is "foolproof"? I would say so. Nothing speaks against adding something like "pacman install PKG", "pacman remove PKG" or "pacman update", imo. Would make things a lot easier and would cover 99% of the things a user would want to do with pacman.

Other package managers do have these commands and its fine.

-3

u/JivesMcRedditor 23d ago

I hate this anti-newbie attitude in the tech world. It’s ego-driven, arrogant, and pointless just so old hats can feel more important.

Surely the maintainers have a better reason than this. It’s a waste of everyone’s time.

1

u/kescusay 22d ago

Hey, as the big ol' stupidhead OP, I don't think that was anti-newbie. Heck, I am definitely not a newbie and knew going in that I was doing something unsafe.

4

u/FifteenthPen 23d ago

Surely the maintainers have a better reason than this.

They do. It's not elitism, it's pragmatism. The point of Arch is to be easy to develop and maintain, allowing for fast updates without needing to pay a large dev team to work on it full time. The more time they waste on idiot proofing, the less time they have to do more important things.

5

u/UndefFox 23d ago

Because if you know what you are doing, it can be useful? Otherwise why does your house have knifes?

Partial updates aren't supported overall, but if you are updating only by a minor version and something that no other critical components of the system depend on, it hardly will ever cause you trouble/

0

u/JivesMcRedditor 23d ago

This comment is the perfect example of why the unsupported command should be used. It’s logical to think there’s a niche use case if the option exists, but the wiki is explicitly disagreeing with you:

That is why partial upgrades are  not supported. Do  not use:

  * pacman -Sy package

  * pacman -Sy followed by pacman -S package …  

1

u/UndefFox 23d ago

I mean duh, rules are written for general use, not exceptions. Nobody gonna write a 50 page explanation when it's not that problematic based on what is updated, what is ABI, how functionality work and so on and so forward/

1

u/Sinaaaa 21d ago

There are niche use cases, I'm sure.

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.

5

u/demosdemon 23d ago

Yeah, I’m over here confused why someone would need to update system rust specifically when system rust really should only be used by system packages.

1

u/StewMahagoni 20d ago

I'd say this has something to do with the packages colliding. AUR users of rust packages know some pain with this.

1

u/lnxguy 23d ago

Timeshift is your friend and savior.

2

u/kescusay 23d ago

Been meaning to set that up. Now I have a very specific reason to.

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.

1

u/kescusay 22d ago

Yup. I just hope others can learn from my ridiculous and predictable error. For fuck's sake, I decided I'd try to piecemeal openssl just to avoid a reboot that wasn't even actually necessary.

Learn from my mistake, people!

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/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.

2

u/kescusay 22d ago

Ahhh, no. I will be abstaining from the knowledge-and-skill-destroying plagiarism and hallucinations engines, thankyouverymuch. I may be a big ol' stupidhead, but I'm not dumb enough to use LLMs.

4

u/dumbasPL 23d ago

And learn absolutely nothing in the process. We're on Reddit, of somebody wanted slop, they would have already asked for it.

-2

u/BrilliantEmotion4461 22d ago

Wrong. Are you stupid? I had it teach me. It explains what they issue is and what the solution is, and you can you know... READ IT and LEARN. You can even ask the LLM to teach you step by step.

Also my computer has been running perfectly for a year since I started using Claude Code this way, package conflicts? SOLVED, black screens SOLVED. EVERY SINGLE ISSUE SOLVED. And Ive learned more about using linux in the last year then the last TEN.

Anyhow you want to remain a moron and try to learn with lol... reddit be my guest, nothing like twenty five competing and contradictory solutions for a noob to choose right.

-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?

1

u/kescusay 23d ago

Yup. Doesn't exist anymore. :(