You are not logged in.

#1 2020-07-22 11:10:25

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

pacman: error while loading shared libraries: libalpm.so.12

Hi to everyone. I would like to ask for your help.

I did an system update with pacman -Syu, but i did it while i had hibernation turned on (after few minutes). When i went back to laptop i saw that hibernation turned on, laptop was suspended. I could not bring it again, becasue during update kernel was not replaced corectly. I run Arch-live-usb media, did again update, rebooted and...first thing what i saw was crash. Filesystem was corrupted. I repaired it with fsck, could boot in Arch again but other problem comes.

I cant do upgrade, i cant use pacman because of

pacman: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory

Could somebody help or point me? I rebooted, mount root partition into Arch-live-usb. Reinstalled pacman with

pacman --root=/mnt -Syu

Pacman was reinstalled, but when i rebooted to Arch i still have the same problem with libalpm.so.12

ls -l /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root 17 07-01 03:52 /usr/lib/libalpm.so -> libalpm.so.12.0.2

So it is in my filesystem. Now i don't know what to do. Please, help. I cant even check pacman version with

 pacman --version

  bacuse of this error.


I checked something more

ldd /usr/bin/pacman
        linux-vdso.so.1 (0x00007fff16734000)
        libalpm.so.12 => not found
        libarchive.so.13 => /usr/lib/libarchive.so.13 (0x00007f39255ba000)
        libc.so.6 => /usr/lib/libc.so.6 (0x00007f39253f3000)
        libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007f3925116000)
        libacl.so.1 => /usr/lib/libacl.so.1 (0x00007f392510b000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f39250db000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f39250b1000)
        libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007f3924fdf000)
        liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f3924fbd000)
        libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f3924faa000)
        libz.so.1 => /usr/lib/libz.so.1 (0x00007f3924f90000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f392570a000)
        libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f3924f8a000)
        libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f3924f66000)
        libattr.so.1 => /usr/lib/libattr.so.1 (0x00007f3924f5f000)

If i think correctly, there is no libalpm.so.12 at all. So, how to force install it, which package have it?

Last edited by firekage (2020-07-22 11:18:08)

Offline

#2 2020-07-22 11:15:57

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,702
Website

Re: pacman: error while loading shared libraries: libalpm.so.12

firekage wrote:
ls -l /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root 17 07-01 03:52 /usr/lib/libalpm.so -> libalpm.so.12.0.2

There should be more:

$ ls -l /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root     17  1. Jul 03:52 /usr/lib/libalpm.so -> libalpm.so.12.0.2
lrwxrwxrwx 1 root root     17  1. Jul 03:52 /usr/lib/libalpm.so.12 -> libalpm.so.12.0.2
-rwxr-xr-x 1 root root 223512  1. Jul 03:52 /usr/lib/libalpm.so.12.0.2

Try

pacman --root=/mnt -Syu pacman

from the live ISO.


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#3 2020-07-22 11:18:07

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: pacman: error while loading shared libraries: libalpm.so.12

Essentially you'd need to reinstall pacman.
Not sure how to accompish that.
Maybe you can get the missing files:

ls -l /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root 17 Jul 1 04:52 /usr/lib/libalpm.so -> libalpm.so.12.0.2*
lrwxrwxrwx 1 root root 17 Jul 1 04:52 /usr/lib/libalpm.so.12 -> libalpm.so.12.0.2*
-rwxr-xr-x 1 root root 219K Jul 1 04:52 /usr/lib/libalpm.so.12.0.2*

(/usr/lib/libalpm.so.12.0.2 belongs to pacman itself) and move them to that directory manually, then try to re-install pacman and fix your system.

edit: too slow. And I already suspected a chroot would be more elegant...

Last edited by ondoho (2020-07-22 11:18:55)

Offline

#4 2020-07-22 11:19:16

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: pacman: error while loading shared libraries: libalpm.so.12

schard wrote:
firekage wrote:
ls -l /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root 17 07-01 03:52 /usr/lib/libalpm.so -> libalpm.so.12.0.2

There should be more:

$ ls -l /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root     17  1. Jul 03:52 /usr/lib/libalpm.so -> libalpm.so.12.0.2
lrwxrwxrwx 1 root root     17  1. Jul 03:52 /usr/lib/libalpm.so.12 -> libalpm.so.12.0.2
-rwxr-xr-x 1 root root 223512  1. Jul 03:52 /usr/lib/libalpm.so.12.0.2

Try

pacman --root=/mnt -Syu pacman

from the live ISO.


I did that with arch-usb-live media. Does not work. Still i don't have this files.

Offline

#5 2020-07-22 11:19:59

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: pacman: error while loading shared libraries: libalpm.so.12

ondoho wrote:

Essentially you'd need to reinstall pacman.
Not sure how to accompish that.
Maybe you can get the missing files:

ls -l /usr/lib/libalpm.so*
lrwxrwxrwx 1 root root 17 Jul 1 04:52 /usr/lib/libalpm.so -> libalpm.so.12.0.2*
lrwxrwxrwx 1 root root 17 Jul 1 04:52 /usr/lib/libalpm.so.12 -> libalpm.so.12.0.2*
-rwxr-xr-x 1 root root 219K Jul 1 04:52 /usr/lib/libalpm.so.12.0.2*

(/usr/lib/libalpm.so.12.0.2 belongs to pacman itself) and move them to that directory manually, then try to re-install pacman and fix your system.

edit: too slow. And I already suspected a chroot would be more elegant...



Yeah, i figured that, try and did that but still after reinstalling pacman i don't have this files and cant use it. Unfortunately, in chroot-mode it does not work at all. In chroot-mode i cant install anything because of missing files.

Last edited by firekage (2020-07-22 11:21:23)

Offline

#6 2020-07-22 11:20:43

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 2,702
Website

Re: pacman: error while loading shared libraries: libalpm.so.12

Then I refer to @ondoho suggestion.
Extract the respective file from the package archive in the package cache.

But since the file is owned by pacman, this seems rather strange behaviour.
Please provide your full pacman.log and pacman.conf.
There Might be a faulty NoExtract in place.

Last edited by schard (2020-07-22 11:23:26)


Inofficial first vice president of the Rust Evangelism Strike Force

Offline

#7 2020-07-22 11:29:43

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: pacman: error while loading shared libraries: libalpm.so.12

firekage wrote:

Does not work.

That's a bit thin.
https://wiki.archlinux.org/index.php/Co … ow_to_post

When asking questions, provide as much information as possible, including error messages, terminal output, logs, what you have previously tried, what documentation and searches you have attempted, and related configuration files.

Offline

#8 2020-07-22 12:08:35

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: pacman: error while loading shared libraries: libalpm.so.12

ondoho wrote:
firekage wrote:

Does not work.

That's a bit thin.
https://wiki.archlinux.org/index.php/Co … ow_to_post

When asking questions, provide as much information as possible, including error messages, terminal output, logs, what you have previously tried, what documentation and searches you have attempted, and related configuration files.


I write why. Because of the same missing file libalpm.so.12. Cannot open shared object because of that.




I did something more. I just downloaded missing files, copied it to needed location. Pacman barely works. I can now run commands, but cant update anythig because of "pim-data-exporter", besause conflict files in filesystem. Everything is related to pim-data-exporter, but i don't know how to completly remove it. Many files, many locations, and doing it manually takes forever.


I don't know other ways to replace filest that are in filesystem exept do delete it manually - long road, did it. Problem solved but not the way i would like to be.

Last edited by firekage (2020-07-22 13:07:34)

Offline

#9 2020-07-22 13:16:12

loqs
Member
Registered: 2014-03-06
Posts: 19,048

Re: pacman: error while loading shared libraries: libalpm.so.12

firekage wrote:

I can now run commands, but cant update anythig because of "pim-data-exporter", besause conflict files in filesystem. Everything is related to pim-data-exporter, but i don't know how to completly remove it. Many files, many locations, and doing it manually takes forever.

What command are you using to perform an update and what is its output?  See the tip box from pastebin to post the output.

Offline

#10 2020-07-22 20:31:55

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 628

Re: pacman: error while loading shared libraries: libalpm.so.12

loqs wrote:
firekage wrote:

I can now run commands, but cant update anythig because of "pim-data-exporter", besause conflict files in filesystem. Everything is related to pim-data-exporter, but i don't know how to completly remove it. Many files, many locations, and doing it manually takes forever.

What command are you using to perform an update and what is its output?  See the tip box from pastebin to post the output.


I always do with -Syu option. I just finished and fixed all. Pacman works correctly again.

I would like to learn replacing conflicting files with a faster approach, because i had to manually deleted conflicting files in all locations. It were files from pim-data-extractor, but if it were more packages it could took forever with multiple files and locations. No i had only one package with around 40 files in different locations so i jus deleted it manually. But what if it was more?

Last edited by firekage (2020-07-22 20:33:19)

Offline

#11 2020-07-22 20:38:59

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: pacman: error while loading shared libraries: libalpm.so.12

firekage wrote:

I would like to learn replacing conflicting files with a faster approach, because i had to manually deleted conflicting files in all locations. It were files from pim-data-extractor, but if it were more packages it could took forever with multiple files and locations. No i had only one package with around 40 files in different locations so i jus deleted it manually. But what if it was more?

Read the man page for pacman and look for the overwrite option which accepts a glob pattern.

Last edited by CarbonChauvinist (2020-07-22 20:39:45)


"the wind-blown way, wanna win? don't play"

Offline

#12 2020-07-22 21:16:38

loqs
Member
Registered: 2014-03-06
Posts: 19,048

Re: pacman: error while loading shared libraries: libalpm.so.12

If the files were owned by pim-data-exporter but the pacman database for that package had become corrupted you could do the following:

pacman -S --dbonly pim-data-exporter
pacman -S pim-data-exporter

This is speculating though as you did not post the pacman output.

Offline

Board footer

Powered by FluxBB