You are not logged in.

#1 2021-09-06 16:05:54

robiot
Member
Registered: 2021-04-23
Posts: 6

[SOLVED] Failed To Initialize Alpm Library

So from nowhere my pacman stopped working today and started saying that it couldn't find/read /var/lib/packman and it failed to initialize alpm library.
Show

When I run it with strace I get this

newfstatat(AT_FDCWD, "ns", 0x7ffc878274a0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=2998, ...}, AT_EMPTY_PATH) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2998
read(3, "", 4096)                       = 0
close(3)                                = 0
openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libalpm.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/libalpm.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/libalpm.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/libalpm.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/libalpm.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/libalpm.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/pacman.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/pacman.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/pacman.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/pacman.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/pacman.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/pacman.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "error: ", 7error: )                  = 7
write(2, "failed to initialize alpm librar"..., 107failed to initialize alpm library:
(root: ns, dbpath: ns/var/lib/pacman/)
could not find or read directory

But the thing is that those files exists

$ sudo pacman -Qo /usr/share/locale/en_GB/LC_MESSAGES/pacman.mo
/usr/share/locale/en_GB/LC_MESSAGES/pacman.mo is owned by pacman 6.0.1-1

$ pacman -Qo /usr/share/locale/en_GB/LC_MESSAGES/libalpm.mo    
/usr/share/locale/en_GB/LC_MESSAGES/libalpm.mo is owned by pacman 6.0.1-1

I have tried everything in this post https://bbs.archlinux.org/viewtopic.php?id=134070

Last edited by robiot (2021-09-06 16:55:16)

Offline

#2 2021-09-06 16:08:34

Scimmia
Fellow
Registered: 2012-09-01
Posts: 8,683

Re: [SOLVED] Failed To Initialize Alpm Library

-r is not -R

Offline

#3 2021-09-06 16:09:12

robiot
Member
Registered: 2021-04-23
Posts: 6

Re: [SOLVED] Failed To Initialize Alpm Library

Oh yeah I forgot

Last edited by robiot (2021-09-06 16:09:56)

Offline

#4 2021-09-06 16:27:09

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,474
Website

Re: [SOLVED] Failed To Initialize Alpm Library

Please remember to mark your thread as solved by editing the first post and amending the topic title.

https://wiki.archlinux.org/title/Genera … ow_to_post


Sakura:-
Mobo: MSI MEG B550 UNIFY // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB