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

**URL:** <https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114>\
**Category:** Pacman & AUR helpers\
**Created:** [November 19, 2021, 1:01pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114 "2021-11-19T13:01:38Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![endeavourosuser](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/e/82dd89/32.png) [@endeavourosuser](https://forum.endeavouros.com/u/endeavourosuser)\
**Post date:** [November 19, 2021, 1:01pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/1 "2021-11-19T13:01:38Z")

</div>

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`?

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [November 19, 2021, 1:53pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/2 "2021-11-19T13:53:41Z")

</div>

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:

[https://archlinuxarm.org/forum/viewtopic.php?t=9294](https://archlinuxarm.org/forum/viewtopic.php?t=9294)

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [November 19, 2021, 3:26pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/3 "2021-11-19T15:26:39Z")

</div>

> [@endeavourosuser](#):
>
> /var/lib/pacman/db.lck

Did you check this file in the other system?  
`/media/a/var/lib/pacman/db.lck`

---

<div class="post-metadata">

**Author:** ![endeavourosuser](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/e/82dd89/32.png) [@endeavourosuser](https://forum.endeavouros.com/u/endeavourosuser)\
**Post date:** [November 19, 2021, 8:28pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/4 "2021-11-19T20:28:05Z")

</div>

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](http://mirror.archlinuxarm.org) : Could not resolve host: [mirror.archlinuxarm.org](http://mirror.archlinuxarm.org)  
warning: too many errors from [mirror.archlinuxarm.org](http://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?

---

<div class="post-metadata">

**Author:** ![manuel](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/manuel/32/396_2.png) [@manuel](https://forum.endeavouros.com/u/manuel)\
**Post date:** [November 19, 2021, 8:34pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/5 "2021-11-19T20:34:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [November 19, 2021, 9:12pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/6 "2021-11-19T21:12:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![endeavourosuser](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/e/82dd89/32.png) [@endeavourosuser](https://forum.endeavouros.com/u/endeavourosuser)\
**Post date:** [November 19, 2021, 9:14pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/7 "2021-11-19T21:14:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [November 19, 2021, 9:16pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/8 "2021-11-19T21:16:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [November 19, 2021, 9:38pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/9 "2021-11-19T21:38:06Z")

</div>

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 😀

---

<div class="post-metadata">

**Author:** ![anon75994754](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@anon75994754](https://forum.endeavouros.com/u/anon75994754)\
**Post date:** [November 19, 2021, 9:39pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/10 "2021-11-19T21:39:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![endeavourosuser](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/e/82dd89/32.png) [@endeavourosuser](https://forum.endeavouros.com/u/endeavourosuser)\
**Post date:** [November 19, 2021, 9:41pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/11 "2021-11-19T21:41:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [November 19, 2021, 9:44pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/12 "2021-11-19T21:44:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![endeavourosuser](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/e/82dd89/32.png) [@endeavourosuser](https://forum.endeavouros.com/u/endeavourosuser)\
**Post date:** [November 19, 2021, 9:47pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/13 "2021-11-19T21:47:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [November 19, 2021, 9:50pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/14 "2021-11-19T21:50:46Z")

</div>

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.

:enos_flag:

---

<div class="post-metadata">

**Author:** ![anon75994754](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/d78d45/32.png) [@anon75994754](https://forum.endeavouros.com/u/anon75994754)\
**Post date:** [November 19, 2021, 11:20pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/15 "2021-11-19T23:20:18Z")

</div>

🤔 look same !! think i see post like it before 😉

" [https://forum.pine64.org/showthread.php?tid=15355](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](https://wiki.pine64.org/wiki/PinePhone_Installation_Instructions#Using_JumpDrive) "

---

<div class="post-metadata">

**Author:** ![Pudge](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pudge/32/17155_2.png) [@Pudge](https://forum.endeavouros.com/u/Pudge)\
**Post date:** [November 20, 2021, 1:41am UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/16 "2021-11-20T01:41:38Z")

</div>

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

```auto
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
privileges.

```

# 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?

Pudge

---

<div class="post-metadata">

**Author:** ![endeavourosuser](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/e/82dd89/32.png) [@endeavourosuser](https://forum.endeavouros.com/u/endeavourosuser)\
**Post date:** [November 20, 2021, 8:31am UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/17 "2021-11-20T08:31:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dalto](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/dalto/32/5577_2.png) [@dalto](https://forum.endeavouros.com/u/dalto)\
**Post date:** [January 14, 2022, 9:26pm UTC](https://forum.endeavouros.com/t/unable-to-update-in-pacman-sysroot-syyu/20114/18 "2022-01-14T21:26:52Z")

</div>

Split this topic on January 14, 2022, 9:26pm UTC

A post was split to a new topic: [Failure to download the endeavouros repo when running pacman -Syu](https://forum.endeavouros.com/t/failure-to-download-the-endeavouros-repo-when-running-pacman-syu/22667)
