Unable to update in `pacman --sysroot -Syyu`

I’m using Endeavouros to access an arch arm on a pinephone through jumpdrive, but when I run
sudo pacman --sysroot /media/a -S uboot-tools
I get the output: 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 when I run sudo pacman --sysroot -Syyu I get the output:
:: Synchronizing package databases…
error: failed to synchronize all databases (unable to lock database)

A common solution I found online was rm /var/lib/pacman/db.lck, but no file called db.lck exists anywhere on my system.

What can I do to recover this phosh-aarch installation on my pinephone using Endeavouros to access it through pacman --sysroot?

Not having any experience of this sort of operation, I am afraid I can’t be of much help but I found the following post on chrooting into ARM based Arch so I thought you might want to investigate it further:


1 Like

Did you check this file in the other system?


Hello, that got me around the problem, however the wifi not working on the phone for whatever reason seems to be causing the following error:
uboot-tools-2021.01-1-aarch64.pkg.tar.xz failed to download
error: failed retrieving file ‘uboot-tools-2021.01-1-aarch64.pkg.tar.xz’ from mirror.archlinuxarm.org : Could not resolve host: mirror.archlinuxarm.org
warning: too many errors from mirror.archlinuxarm.org, skipping for the remainder of this transaction
warning: failed to retrieve some files
error: failed to commit transaction (invalid url for server)
Errors occurred, no packages were upgraded.

Can I somehow update the phone’s apparently broken databases using the internet on the pc without finding every file individually?

It looks like a mirror problem. For example @Pudge knows about the mirrors, hopefully he’s watching… :wink:

Can you mount the root file system of your phone?

If positive, I guess there should be some /etc/resolv.conf that need to be edited according to the link I posted earlier:

you should edit /etc/resolv.conf and enter a DNS address or you won’t be able to resolve DNS addresses at all.

Personally I would try to rename it (back it up) and copy the one from the running system in its place.

I’m not sure what you mean by “mount the root file system on your phone”
Do you mean mounting the root file system currently on my phone to the pc? If so, I have the phone mounted on my pc using jumpdrive.

That’s it then. So if you have write access to you phone’s file system try the above.

1 Like

I have been trying to do a similar thing with EnOS ARM on a SD card. I don’t seem to get it working so far. My guess is that some proper chrooting for ARM based system is needed but I might be wrong.
Hopefully ARM wizards among forum members will chime in here soon.

PS- I see one of the already typing :grinning:

hmmm sure no " /var/lib/pacman/db.lck "on system

the /etc/resolv.conf on my pc and phone appear to be identical. Should I still add anything?

I am not sure. See my previous post. Even copying the resolv.conf to my SD-card with my EnOS ARM didn’t solve the resolving issue.

I’m considering reinstalling the system. I have steps for the applications that I went through customized steps to install documented. I don’t know what happened with the internet on the phone but it’s been suggested on the pine64 forum that there was an error in my installation process, as well as the lack of anyone else appearing to have a pinephone with my same problem.

1 Like

If you are not in a hurry wait and see if @pudge will look in here. Hopefully he will.
Otherwise I wish you the best of luck! Please come back and tell us how things will have worked out.


:thinking: look same !! think i see post like it before :wink:

" https://forum.pine64.org/showthread.php?tid=15355 "

EDIt i no have pinephone . best follow answer in link above .

info how here
" https://wiki.pine64.org/wiki/PinePhone_Installation_Instructions#Using_JumpDrive "

1 Like

I checked the EndeavourOS mirrors, and I don’t see a problem.

This problem occurs while trying to use the Archlinux ARM mirrors via a go between device by using the -sysroot option. I have never tried this, and have never heard of anyone doing this.

From the pacman man page

Pacman will chroot and chdir into the system root
prior to running. This allows mounted guest systems to be properly operated on. Any
other paths given will be interpreted as relative to the system root. Requires root

Any other paths given will be interpreted as relative to the system root.

Which relative to the system root are they referring to? The root of the PC or the root of the Pine Phone?


1 Like

The system’s been reinstalled, but I’ll leave the thread open a bit longer until people are done coming up with possible solutions.

A post was split to a new topic: Failure to download the endeavouros repo when running pacman -Syu