You are not logged in.

#1 2014-12-20 09:02:07

essence-of-foo
Member
Registered: 2008-07-12
Posts: 84

[SOLVED] pacman: error: failed to initialize alpm library

I just upgraded my system about an hour ago and now whenever I run any pacman-related command I get this:

$ pacman
error: failed to initialize alpm library
(database is incorrect version: /var/lib/pacman/)
error:   try running pacman-db-upgrade

How can I get a correct database version?

Last edited by essence-of-foo (2014-12-20 09:13:18)

Offline

#2 2014-12-20 09:14:27

essence-of-foo
Member
Registered: 2008-07-12
Posts: 84

Re: [SOLVED] pacman: error: failed to initialize alpm library

Silly me...

I thought

error:   try running pacman-db-upgrade

Was something that was tried by pacman automatically but it was actually a hint of what to do next. So running

pacman-db-upgrade

solved the problem.

Offline

#3 2014-12-31 12:04:45

Kobussie
Member
From: NL - Groningen
Registered: 2007-04-06
Posts: 43
Website

Re: [SOLVED] pacman: error: failed to initialize alpm library

Thanks!
Worked for me too... just another silly arch-user...

Offline

#4 2014-12-31 17:49:07

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] pacman: error: failed to initialize alpm library

Had to use:

pacman-db-upgrade


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#5 2015-01-01 00:18:53

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman: error: failed to initialize alpm library

Rexilion wrote:

Had to use:

pacman-db-upgrade

So ... you did the same thing as OP and Kobussie? No need to post a 'me too' then.

Offline

#6 2015-01-01 10:07:11

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] pacman: error: failed to initialize alpm library

karol wrote:
Rexilion wrote:

Had to use:

pacman-db-upgrade

So ... you did the same thing as OP and Kobussie? No need to post a 'me too' then.

Whoops misread the commands, I was in a hurry.

Pacman suggested pacman-db-update (which it could not find).


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#7 2015-01-01 12:19:53

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: [SOLVED] pacman: error: failed to initialize alpm library

There is a typo in one of the translations...  Dutch maybe?

Offline

#8 2015-01-01 12:28:15

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: [SOLVED] pacman: error: failed to initialize alpm library

The Dutch translation did indeed have a typo. It was fixed 12 days ago though, so the fix should have made it into the current pacman release.

Offline

#9 2015-01-01 13:09:01

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,400
Website

Re: [SOLVED] pacman: error: failed to initialize alpm library

Nope...   pacman-4.2.0 was created on 2014-12-19.   It will be pulled for the 4.2.1 release.

Offline

#10 2015-01-01 13:20:23

runical
Member
From: The Netherlands
Registered: 2012-03-03
Posts: 896

Re: [SOLVED] pacman: error: failed to initialize alpm library

My mistake. Then the error is indeed in pacman-4.2.0. It will be fixed in the next release then.

Offline

#11 2015-01-02 16:38:34

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Re: [SOLVED] pacman: error: failed to initialize alpm library

shameless plug:

The Dutch translation is very lacking at the moment, some new people joined in recent weeks - here's to hoping things will improve shortly.

Anybody looking to put some time into this and review translations or add to the translations for pacman-scripts (22% at this moment), please do drop me a message through transifex. (https://www.transifex.com/accounts/profile/swilkens/)

Last edited by stefanwilkens (2015-01-02 16:40:19)


Arch i686 on Phenom X4 | GTX760

Offline

#12 2015-01-02 20:23:09

Xavion
Member
From: Australia
Registered: 2010-03-13
Posts: 38

Re: [SOLVED] pacman: error: failed to initialize alpm library

The "pacman-db-upgrade" operation took about 10 minutes here.  This was particularly surprising, given that I've got a SSD.

I was getting worried that it was stuck in an infinite loop somewhere.  I think you should add an extra line to the output text:

==> Pre-4.2 database format detected - upgrading...
==> Please be aware - this will take a f**king eternity.

Offline

#13 2015-01-02 21:29:59

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,163
Website

Re: [SOLVED] pacman: error: failed to initialize alpm library

Xavion wrote:

The "pacman-db-upgrade" operation took about 10 minutes here.  This was particularly surprising, given that I've got a SSD.

I was getting worried that it was stuck in an infinite loop somewhere.  I think you should add an extra line to the output text:

==> Pre-4.2 database format detected - upgrading...
==> Please be aware - this will take a f**king eternity.

Really? For me, it only took 30 seconds or so to upgrade the database format when I did an upgrade on a buddy's machine. And that's a slow dual-core with a rotating disk.


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#14 2015-01-02 21:40:58

Xavion
Member
From: Australia
Registered: 2010-03-13
Posts: 38

Re: [SOLVED] pacman: error: failed to initialize alpm library

Okay, it looks like my recommendation should be reworded slightly:

==> Pre-4.2 database format detected - upgrading...
==> Please be aware - this may take a f**king eternity.

Offline

#15 2015-01-03 02:03:28

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: [SOLVED] pacman: error: failed to initialize alpm library

FWIW, mine finished almost immediately. Maybe 10 seconds. Maybe you just have a huge amount of packages installed?


Matt

"It is very difficult to educate the educated."

Offline

#16 2015-01-03 02:29:45

Xavion
Member
From: Australia
Registered: 2010-03-13
Posts: 38

Re: [SOLVED] pacman: error: failed to initialize alpm library

The output of "pacman -Qs | wc -l" is "3528", which means I've got 1764 packages installed.  It's also worth noting that I make use of the pacman-cage package to (normally) speed things up.

Offline

#17 2015-01-03 04:59:48

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman: error: failed to initialize alpm library

Xavion wrote:

The output of "pacman -Qs | wc -l" is "3528", which means I've got 1764 packages installed.

Q: How to quickly count how many sheep do you have?
A: Count their legs and divide by 4.

pacman -Q | wc -l

Offline

#18 2015-01-03 07:04:13

Xavion
Member
From: Australia
Registered: 2010-03-13
Posts: 38

Re: [SOLVED] pacman: error: failed to initialize alpm library

Oh, well done; you truly are brilliant.  Would you like a medal or a trophy?

Offline

#19 2015-01-03 08:36:42

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] pacman: error: failed to initialize alpm library

stefanwilkens wrote:

shameless plug:

The Dutch translation is very lacking at the moment, some new people joined in recent weeks - here's to hoping things will improve shortly.

Anybody looking to put some time into this and review translations or add to the translations for pacman-scripts (22% at this moment), please do drop me a message through transifex. (https://www.transifex.com/accounts/profile/swilkens/)

Check your transifex inbox!


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#20 2015-01-06 04:46:31

shoelesshunter
Member
From: USA
Registered: 2014-05-18
Posts: 289

Re: [SOLVED] pacman: error: failed to initialize alpm library

I use yaourt and get this upon upgrade:

package-query: error while loading shared libraries: libalpm.so.8: cannot open shared object file: No such file or directory

Last edited by shoelesshunter (2015-01-06 04:47:20)

Offline

#21 2015-01-06 04:50:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] pacman: error: failed to initialize alpm library

Search the boards: there have been plenty of threads about package-query and yaourt.


This is done. Closing.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB