You are not logged in.

#1 2019-05-14 22:09:54

shermixx
Member
Registered: 2015-11-03
Posts: 2

[SOLVED] makepkg fails with failed to initialize alpm library

When trying to build an install a package from AUR, makepkg fails.

$ makepkg
==> Making package: yay 9.2.0-1 (Tue May 14 14:45:42 2019)
==> Checking runtime dependencies...
error: failed to initialize alpm library
(could not open database: /var/lib/pacman/)
==> ERROR: 'pacman' returned a fatal error (255):

This happens with all the packages I have tried to build.

I'm having no issues with pacman directly.  I ran pacman -Tv and verified that all the listed directories exist (including /var/lib/pacman).

Last edited by shermixx (2019-05-15 15:25:21)

Offline

#2 2019-05-15 01:34:58

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 636

Re: [SOLVED] makepkg fails with failed to initialize alpm library

Could be a permissions issue with the pacman db?

When you run a system update do you use sudo?

Anyway, have a look at this
https://bbs.archlinux.org/viewtopic.php?id=208597

Offline

#3 2019-05-15 02:02:25

shermixx
Member
Registered: 2015-11-03
Posts: 2

Re: [SOLVED] makepkg fails with failed to initialize alpm library

When you run a system update do you use sudo?

Ha!  Fair question and the answer is yes.

Something told me it was a permission issue but everywhere I had checked looked fine.  There were several warnings during the install complaining of directory permissions not matching the package but I tracked those down with pacman -Qkk and fixed them.  I thought.

sudo chmod 644 /var/lib/pacman/local/ALPM_DB_VERSION

And all's well.


Thanks for your help!

Offline

#4 2019-05-15 07:08:18

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,688
Website

Re: [SOLVED] makepkg fails with 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/index.php/Co … ow_to_post


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // 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