How to manually download and install libcrypto.so.1.1 and libssl.so.1.1 with pacman being broken

The answer to this question put me on the right path but I still have no idea how to manually download these two packages to follow the answer’s mentioned steps.

  1. Use the link provided in the answer to the question you linked
    to find the package of the Arch Linux site. You can also search
    for any package in the official repositories. You can also search for something like libcrypto and it should list the packages that provide those libraries. In this case the openssl package provides both of the libraries you’re looking for.
  2. On the package page you can see the Provides line lists the libraries you are looking for. Under the Package Contents section you can expand to show all the files that are in the package to confirm it has the files you are looking for, like usr/lib/libcrypto.so.1.1
  3. In the upper right, under Package Actions, click Download From Mirror at the bottom. You should end up with a file like openssl-1.1-1.1.1.s-2-x86_64.pkg.tar.zst.
  4. Extract the contents with tar --use-compress-program=unzstd -xvf openssl-1.1-1.1.1.s-2-x86_64.pkg.tar.zst
  5. In the unpackaged folder, find the files you need at the locations from the file list in step 2 and copy them to the corresponding location on your system.
Answered By: fooot

Instead try copying /usr/lib/libalmp* from an USB disk image into your internal storage.

You can fix pacman temporarily using LD_LIBRARY_PATH.

Remember to use

ldd /usr/bin/pacman

to check if libraries are missing. Instead of moving the library needed after download from someplace like browsing to http://mirror.rit.edu/archlinux/core/os/x86_64/ and trying to manually install the missing library, unpack the TAR files in a new local directory and use

export LD_LIBRARY_PATH=/root/pacmanpanic/usr/lib/

where you replace /root/pacmanpanic/ to wherever you untared the files.

Use ldd to check no libraries are missing and that you correctly set the LD_LIBRARY_PATH. Remember that LD_LIBRARY_PATH overrides normal library paths to fix issues and can be used to store libraries somewhere else.

Then you can run pacman from command line without issue to fix the problem avoiding the use of override. This would be installation of missing packages.

Answered By: user6830669
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.