You are not logged in.

#1 2012-09-16 07:53:19

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 262
Website

[SOLVED] pacman: "unable to lock database"

Hey!

I have been working hard to install my Arch Linux as all of you have but now that i finally installed it i am trying to do some
postinstalation things located here.

I first opened /etc/pacman.conf file and at the end of the file added the repository [multilib], which pacman was
supposed to look for on my 1st mirror in /etc/pacman.d/mirrorlist which is this one.
Long story short, this is the code i added in my /etc/pacman.conf:

[multilib]
Include = /etc/pacman.d/mirrorlist

I saved the file but while mirror is available pacman still refuses to update mirror lists using command:

pacman -Syy

This produces the error:

Warning: database file for 'multilib' does not exist
:: Synchronizing package databases...
error failed to update core (unable to lock database)
error failed to update extra (unable to lock database)
error failed to update comunity (unable to lock database)
error failed to update multilib (unable to lock database)
error failed to synchronize any databases
error failed to init transaction (unable to lock database)
error: could not lock database: File Exists
    If you're sure a package manager is not already running, you can remove [b]/var/lib/pacman/db.lck[/b] 

I am currently logged in as root and i don't know why is the database locked, as root was supposed to be able to do whatever he likes?
What can i do to resolve the "lock database" error?


Thank you

Last edited by 71GA (2012-09-16 09:28:37)


Arch Linux user dealing with ARM9 / ARM Cortex-M developement in Kdevelop IDE, 3D modeling in Bricscad, PCB production in EAGLE CAD, 3D animation in Blender, milling through LinuxCNC and songwriting in Bitwig & GuitarPRO.

Offline

#2 2012-09-16 08:04:53

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED] pacman: "unable to lock database"

Did you try to remove the db.lck file? This happens when pacman is interrupted.

Offline

#3 2012-09-16 08:06:12

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 262
Website

Re: [SOLVED] pacman: "unable to lock database"

swanson wrote:

Did you try to remove the db.lck file? This happens when pacman is interrupted.

Is it safe to do it?


Arch Linux user dealing with ARM9 / ARM Cortex-M developement in Kdevelop IDE, 3D modeling in Bricscad, PCB production in EAGLE CAD, 3D animation in Blender, milling through LinuxCNC and songwriting in Bitwig & GuitarPRO.

Offline

#4 2012-09-16 08:26:39

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 262
Website

Re: [SOLVED] pacman: "unable to lock database"

I did remove /var/lib/pacman/db.lck and again used command

pacman -Syy

And it partialy worked as it did update repositories [core] [extra] and [comunity]. After this it again reports
an error about [multilib]. This is the error which i get for every mirror listed in my /etc/pacman.d/mirrorlist file:

error: failed retrievingfile 'multilib.db' from mirror.de.leaseweb.net : The requested URL returned error: 404 Not Found

"404 Not Found" indicates that URL cant be found which could be an internet problem, but this can't be the issue here
as other depositories are sucessfully installed and furthermore it could never have happend to all the mirrors at once.

Last edited by 71GA (2012-09-16 08:28:06)


Arch Linux user dealing with ARM9 / ARM Cortex-M developement in Kdevelop IDE, 3D modeling in Bricscad, PCB production in EAGLE CAD, 3D animation in Blender, milling through LinuxCNC and songwriting in Bitwig & GuitarPRO.

Offline

#5 2012-09-16 08:35:40

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,836
Website

Re: [SOLVED] pacman: "unable to lock database"

Please paste the output of uname -a


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#6 2012-09-16 08:44:03

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 262
Website

Re: [SOLVED] pacman: "unable to lock database"

jasonwryan wrote:

Please paste the output of uname -a

Linux ziga-laptop 3.5.3-1-ARCH #1 SMP PREEMPT Sun Aug 26 08:15:06 UTC 2012 i686 GNU/Linux

I ve noticed that my time isnt correct.


Arch Linux user dealing with ARM9 / ARM Cortex-M developement in Kdevelop IDE, 3D modeling in Bricscad, PCB production in EAGLE CAD, 3D animation in Blender, milling through LinuxCNC and songwriting in Bitwig & GuitarPRO.

Offline

#7 2012-09-16 08:55:07

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,836
Website

Re: [SOLVED] pacman: "unable to lock database"

71GA wrote:
jasonwryan wrote:

Please paste the output of uname -a

Linux ziga-laptop 3.5.3-1-ARCH #1 SMP PREEMPT Sun Aug 26 08:15:06 UTC 2012 i686 GNU/Linux

I ve noticed that my time isnt correct.

That's not the cause of your problems smile

Arch Wiki wrote:

Enabling the [multilib] repository allows the user to run and build 32-bit applications on 64-bit installations of Arch Linux.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#8 2012-09-16 09:27:54

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 262
Website

Re: [SOLVED] pacman: "unable to lock database"

Arch Wiki wrote:

Enabling the [multilib] repository allows the user to run and build 32-bit applications on 64-bit installations of Arch Linux.

OMG how could i have been so stupid! I installed a 32-bit Arch Linux because i couldn't choose 64-bit when booting from dual boot ISO in my virtual box.
And then i forgot about that.


Arch Linux user dealing with ARM9 / ARM Cortex-M developement in Kdevelop IDE, 3D modeling in Bricscad, PCB production in EAGLE CAD, 3D animation in Blender, milling through LinuxCNC and songwriting in Bitwig & GuitarPRO.

Offline

Board footer

Powered by FluxBB