You are not logged in.

#1 2023-03-10 03:56:02

GENgreen
Member
Registered: 2023-02-17
Posts: 14

pacman error : failed to synchronize all databases

after i use pacman -Syyu
it stopped and i try this again this happen

:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)

system still work well
no shutdown just pacman don't work
i have reboot it but pacman still don't work
and i can't use pacman to download and install thing
use KDevelop as an example

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 /var/lib/pacman/db.lck

and i tried remove rm: cannot remove /var/lib/pacman/db.lck
but

rm: cannot remove './var/lib/pacman/db.lck': No such file or directory

Offline

#2 2023-03-10 04:02:02

mpan
Member
Registered: 2012-08-01
Posts: 1,188
Website

Re: pacman error : failed to synchronize all databases

Look carefully at the beginning of the path indicated in the error message and the path you are trying to remove. They are not the same.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2023-03-10 08:23:16

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: pacman error : failed to synchronize all databases

mpan wrote:

Look carefully at the beginning of the path indicated in the error message and the path you are trying to remove. They are not the same.

Unless $PWD is /
SCNR

Offline

#4 2023-03-10 12:03:51

mpan
Member
Registered: 2012-08-01
Posts: 1,188
Website

Re: pacman error : failed to synchronize all databases

Haha! big_smile


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#5 2023-03-11 05:47:27

GENgreen
Member
Registered: 2023-02-17
Posts: 14

Re: pacman error : failed to synchronize all databases

schard wrote:
mpan wrote:

Look carefully at the beginning of the path indicated in the error message and the path you are trying to remove. They are not the same.

Unless $PWD is /
SCNR

sorry
i don't know exactly how to do it
is like that ?

pwd
/home/s

Offline

#6 2023-03-11 07:44:30

seth
Member
Registered: 2012-09-03
Posts: 49,947

Re: pacman error : failed to synchronize all databases

You can ignore schard's and mpan's nerd-banter, focus on what mpan wrote in #2

Online

#7 2023-03-11 14:56:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: pacman error : failed to synchronize all databases

Stronger hint.   The path you typed is a relative path.  You need an absolute path like the one in the error message.

Also,  please explain why you are using -yy in your pacman invocation instead of -y  (hint: It is probably the True Origin™ of your original problem)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#8 2023-03-12 04:01:50

GENgreen
Member
Registered: 2023-02-17
Posts: 14

Re: pacman error : failed to synchronize all databases

ewaller wrote:

Stronger hint.   The path you typed is a relative path.  You need an absolute path like the one in the error message.

Also,  please explain why you are using -yy in your pacman invocation instead of -y  (hint: It is probably the True Origin™ of your original problem)

Because there have been frequent network problems in the past few months
and need to wait a long time for repair
so use -yy because i don't when network problems and can't update

Offline

#9 2023-03-12 06:55:50

seth
Member
Registered: 2012-09-03
Posts: 49,947

Re: pacman error : failed to synchronize all databases

Were you able to fix your original problem along mpan's hint and ewaller's explanation?

Online

#10 2023-03-12 16:49:48

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: pacman error : failed to synchronize all databases

GENgreen wrote:

Because there have been frequent network problems in the past few months
and need to wait a long time for repair
so use -yy because i don't when network problems and can't update

That makes no sense.  You have network problems, but you use -yy to force pacman do re-download everything over a dodgy network while abusing the servers by using excessive bandwidth.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#11 2023-03-12 17:17:14

seth
Member
Registered: 2012-09-03
Posts: 49,947

Re: pacman error : failed to synchronize all databases

Afaiu

so use -yy because i don't when network problems and can't update

the OP trashed their database w/ a corrupted update and seeks to fix that w/ -yy
Whether or not that's required in the specific situation is a different matter - not sure how network issues would result in a stale /var/lib/pacman/db.lck
Unless the "network" is the electric grid…

Online

#12 2023-03-13 05:47:21

GENgreen
Member
Registered: 2023-02-17
Posts: 14

Re: pacman error : failed to synchronize all databases

Great, now i know why this things happen
I won't be like this next time

So is there any good solution to this problem

Offline

#13 2023-03-13 06:58:19

seth
Member
Registered: 2012-09-03
Posts: 49,947

Re: pacman error : failed to synchronize all databases

Solution to what problem?
You "network" isssues? Switch to the secondworst ISP in your area?

The original problem of this thread?
mpan hinted at out your mistake and ewaller has explained it.

Online

#14 2023-03-14 05:29:28

GENgreen
Member
Registered: 2023-02-17
Posts: 14

Re: pacman error : failed to synchronize all databases

seth wrote:

Solution to what problem?
You "network" isssues? Switch to the secondworst ISP in your area?

The original problem of this thread?
mpan hinted at out your mistake and ewaller has explained it.

thanks
let me try it

Offline

Board footer

Powered by FluxBB