# Cannot lock database

**URL:** https://rebornos.discourse.group/t/cannot-lock-database/857
**Category:** Installation and Live media
**Tags:** installer
**Created:** [November 4, 2022, 2:07pm UTC](https://rebornos.discourse.group/t/cannot-lock-database/857 "2022-11-04T14:07:46Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![semperlin](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@semperlin](https://rebornos.discourse.group/u/semperlin)
#### Post date: [November 4, 2022, 2:07pm UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/1 "2022-11-04T14:07:46Z")

</div>

‘Cannot lock database’ message appears while installing an app  
In Manjaro I find a solution [Pacman troubleshooting - Manjaro](https://wiki.manjaro.org/index.php/Pacman_troubleshooting) for it.  
What can I do on Reborn OS?

---

<div class="post-metadata">

### Author: ![Rafael](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/rafael/32/438_2.png) [@Rafael](https://rebornos.discourse.group/u/Rafael)
#### Post date: [November 4, 2022, 5:59pm UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/2 "2022-11-04T17:59:08Z")

</div>

Try removing the database lock file:

```auto
sudo rm /var/lib/pacman/db.lck

```

…and try again.

I hope you are well.

---

<div class="post-metadata">

### Author: ![semperlin](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@semperlin](https://rebornos.discourse.group/u/semperlin)
#### Post date: [November 4, 2022, 7:00pm UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/3 "2022-11-04T19:00:26Z")

</div>

> [@Rafael](#):
>
> `sudo rm /var/lib/pacman/db.lck`

This I found in the link to Manjaro.  
Because I cannot find the file in RebornOS, I wanted help here.

---

<div class="post-metadata">

### Author: ![Rafael](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/rafael/32/438_2.png) [@Rafael](https://rebornos.discourse.group/u/Rafael)
#### Post date: [November 4, 2022, 10:12pm UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/4 "2022-11-04T22:12:10Z")

</div>

Please: show me the command you run and the exact message you get. The more data you give me, the better it will be to try to find a solution.

Sorry for the late reply, but I’m working…

---

<div class="post-metadata">

### Author: ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)
#### Post date: [November 5, 2022, 4:57pm UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/5 "2022-11-05T16:57:00Z")

</div>

The instructions are the same for RebornOS. Did you not find the lock file? If the lock file is not found, can you try re-running the pacman command?

---

<div class="post-metadata">

### Author: ![semperlin](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@semperlin](https://rebornos.discourse.group/u/semperlin)
#### Post date: [November 5, 2022, 5:20pm UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/6 "2022-11-05T17:20:07Z")

</div>

For the moment I have no updates. I will try your advice later. Thanks!

---

<div class="post-metadata">

### Author: ![semperlin](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@semperlin](https://rebornos.discourse.group/u/semperlin)
#### Post date: [November 6, 2022, 11:09am UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/7 "2022-11-06T11:09:56Z")

</div>

Here is a new installation with the error message.  
But unlike the message, the programs install or update without any problems.

 ![Screenshot_20221106_120542](https://global.discourse-cdn.com/free1/uploads/rebornos/original/1X/6b3ab3f63e640e303e025896f8444f64180e4ab0.png)

---

<div class="post-metadata">

### Author: ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)
#### Post date: [November 7, 2022, 12:13am UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/8 "2022-11-07T00:13:29Z")

</div>

Try running this on a terminal:

```nohighlight
sudo rm /var/lib/pacman/db.lck

LANG=C sudo pacman -Syyu

```

---

<div class="post-metadata">

### Author: ![semperlin](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@semperlin](https://rebornos.discourse.group/u/semperlin)
#### Post date: [November 7, 2022, 7:55am UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/9 "2022-11-07T07:55:44Z")

</div>

The input

> sudo rm /var/lib/pacman/db.lck  
> LANG=C sudo pacman -Syyu

gave back

> [sudo] Passwort für aw:

But my pw doesn’t work.

You see I don´t know what to do right.

---

<div class="post-metadata">

### Author: ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)
#### Post date: [November 9, 2022, 5:37am UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/11 "2022-11-09T05:37:56Z")

</div>

Strange. Are you able to run any command with sudo? It sticks, so after a successful run, you can run the rest of the commands within a time interval without any password

---

<div class="post-metadata">

### Author: ![semperlin](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@semperlin](https://rebornos.discourse.group/u/semperlin)
#### Post date: [November 9, 2022, 9:31am UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/12 "2022-11-09T09:31:02Z")

</div>

> [@shivanandvp](#):
>
> Strange. Are you able to run any command with sudo?

for example:

> sudo nano /etc/hosts

I mostly install and update with sudo pacmann. It works.

> [@shivanandvp](#):
>
> so after a successful run, you can run the rest of the commands within a time interval without any password

It is also ok.

---

<div class="post-metadata">

### Author: ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)
#### Post date: [November 21, 2022, 6:07pm UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/13 "2022-11-21T18:07:30Z")

</div>

@semperlin Sorry for the delayed follow-up. How is this going?

---

<div class="post-metadata">

### Author: ![semperlin](https://avatars.discourse-cdn.com/v4/letter/s/ad7895/32.png) [@semperlin](https://rebornos.discourse.group/u/semperlin)
#### Post date: [November 13, 2023, 8:20am UTC](https://rebornos.discourse.group/t/cannot-lock-database/857/14 "2023-11-13T08:20:18Z")

</div>

One year later, and another question. But here i must say that it worked for a year. Sorry for delayed .Thanks
