# Cannot run system update

**URL:** <https://forum.yunohost.org/t/cannot-run-system-update/28662>\
**Category:** Support\
**Tags:** update, bug, english\
**Created:** [February 22, 2024, 6:18am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662 "2024-02-22T06:18:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceciliyazi](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@ceciliyazi](https://forum.yunohost.org/u/ceciliyazi)\
**Post date:** [February 22, 2024, 6:18am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/1 "2024-02-22T06:18:13Z")

</div>

### My YunoHost server

**Hardware:** DigitalOcean Droplet  
**YunoHost version:** 11.1.19 (stable).  
**I have access to my server :** Through SSH | through the webadmin  
**Are you in a special context or did you perform some particular tweaking on your YunoHost instance ?** : no  
**If yes, please explain:**

### Description of my issue

I’m seeing some similar error 500 posts but not sure if mine is the same or not…

I was trying to install some applications, but it tells me to update my Yunohost system first. However, it seems like I cannot run a system update. I have rebooted the system as well as rebooted my DigitalOcean Droplet.. neither seemed to solve the problem.

Here’s the diagnosis:  
[https://paste.yunohost.org/raw/melojobesi](https://paste.yunohost.org/raw/melojobesi)

The system update error message is 500, with **Action** : `"PUT" /yunohost/api/update/all`

```auto
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/api.py", line 457, in process
    ret = self.actionsmap.process(arguments, timeout=30, route=_route)
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 584, in process
    return func(**arguments)
  File "/usr/lib/python3/dist-packages/yunohost/tools.py", line 372, in tools_update
    upgradable_apps = _list_upgradable_apps()
  File "/usr/lib/python3/dist-packages/yunohost/app.py", line 2621, in _list_upgradable_apps
    app["notifications"]["PRE_UPGRADE"] = _filter_and_hydrate_notifications(
  File "/usr/lib/python3/dist-packages/yunohost/app.py", line 3142, in _filter_and_hydrate_notifications
    return {
  File "/usr/lib/python3/dist-packages/yunohost/app.py", line 3148, in <dictcomp>
    or is_version_more_recent_than_current_version(name)
  File "/usr/lib/python3/dist-packages/yunohost/app.py", line 3134, in is_version_more_recent_than_current_version
    current_version = str(current_version)
UnboundLocalError: local variable 'current_version' referenced before assignment

```

 ![Screen Shot 2024-02-22 at 2.14.05 PM](https://forum.yunohost.org/uploads/default/original/2X/7/7d237627a0b8d6eb6c355ab11d438cc536e9aeee.png)

 ![Screen Shot 2024-02-22 at 2.14.33 PM](https://forum.yunohost.org/uploads/default/original/2X/b/ba202346688194fd80f32034be7ff62c59f1aaf9.png)

Thank you so much!!!

---

<div class="post-metadata">

**Author:** ![crustyourmind](https://forum.yunohost.org/user_avatar/forum.yunohost.org/crustyourmind/32/2197_2.png) [@crustyourmind](https://forum.yunohost.org/u/crustyourmind)\
**Post date:** [February 22, 2024, 6:44am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/2 "2024-02-22T06:44:55Z")

</div>

yep the warning about sury repo ket can be solve with following this thread

> [@Something went wrong while updating the cache of APT (due to SURY) (version 2024)](https://forum.yunohost.org/t/something-went-wrong-while-updating-the-cache-of-apt-due-to-sury-version-2024/28570/3):
>
> Nice works fine wink Thx

Hope that help you 😉

---

<div class="post-metadata">

**Author:** ![ceciliyazi](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@ceciliyazi](https://forum.yunohost.org/u/ceciliyazi)\
**Post date:** [February 22, 2024, 1:41pm UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/3 "2024-02-22T13:41:12Z")

</div>

Thank you for the lead! But I tried with `sudo apt-key del 95BD4743; wget -nv -O - “https://packages.sury.org/php/apt.gpg” | sudo apt-key add -` and getting this:

```auto
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

```

---

<div class="post-metadata">

**Author:** ![OniriCorpe](https://forum.yunohost.org/user_avatar/forum.yunohost.org/oniricorpe/32/3356_2.png) [@OniriCorpe](https://forum.yunohost.org/u/OniriCorpe)\
**Post date:** [February 22, 2024, 1:52pm UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/4 "2024-02-22T13:52:56Z")

</div>

This warning is not a problem ^w^

---

<div class="post-metadata">

**Author:** ![ceciliyazi](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@ceciliyazi](https://forum.yunohost.org/u/ceciliyazi)\
**Post date:** [February 22, 2024, 2:09pm UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/5 "2024-02-22T14:09:48Z")

</div>

ooo really? and i tried updating again on yunohost and receiving the still error messages there ☹

---

<div class="post-metadata">

**Author:** ![OniriCorpe](https://forum.yunohost.org/user_avatar/forum.yunohost.org/oniricorpe/32/3356_2.png) [@OniriCorpe](https://forum.yunohost.org/u/OniriCorpe)\
**Post date:** [February 22, 2024, 2:28pm UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/6 "2024-02-22T14:28:10Z")

</div>

can you try `yunohost tools regen-conf` please?

---

<div class="post-metadata">

**Author:** ![ceciliyazi](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@ceciliyazi](https://forum.yunohost.org/u/ceciliyazi)\
**Post date:** [February 24, 2024, 5:10am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/7 "2024-02-24T05:10:53Z")

</div>

tried `yunohost tools regen-conf` and got this:  
 ![Screen Shot 2024-02-24 at 1.08.56 PM](https://forum.yunohost.org/uploads/default/original/2X/8/83c8900043f2433de2fa6eae01fb05276cac7d72.png)

and i ran `sudo apt-key del 95BD4743; wget -nv -O - “https://packages.sury.org/php/apt.gpg” | sudo apt-key add -` again

still got the same warnings and error message when trying to update on yunohost 😕

---

<div class="post-metadata">

**Author:** ![OniriCorpe](https://forum.yunohost.org/user_avatar/forum.yunohost.org/oniricorpe/32/3356_2.png) [@OniriCorpe](https://forum.yunohost.org/u/OniriCorpe)\
**Post date:** [February 24, 2024, 6:20am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/8 "2024-02-24T06:20:42Z")

</div>

humm yes `yunohost tools regen-conf` can’t work for this issue since you’re not using yunohost `11.2.10.1`

can you rerun this exact line, by copying it and not typing it (the line that you put in your last message is not good, because of the wrong kind of quotes":  
`sudo apt-key del 95BD4743; wget -nv -O - "https://packages.sury.org/php/apt.gpg" | sudo apt-key add -`

then, to upgrade your system while not using the web interface:  
`sudo apt update && sudo apt upgrade`

---

<div class="post-metadata">

**Author:** ![ceciliyazi](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@ceciliyazi](https://forum.yunohost.org/u/ceciliyazi)\
**Post date:** [February 24, 2024, 6:48am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/9 "2024-02-24T06:48:44Z")

</div>

ah yes, thank you for catching the quotes!

just tried both  
`sudo apt-key del 95BD4743; wget -nv -O - "https://packages.sury.org/php/apt.gpg" | sudo apt-key add -`

`sudo apt update && sudo apt upgrade`

and now i’m at 11.2.10.1. !!! 🙂 thank you so much!

---

<div class="post-metadata">

**Author:** ![OniriCorpe](https://forum.yunohost.org/user_avatar/forum.yunohost.org/oniricorpe/32/3356_2.png) [@OniriCorpe](https://forum.yunohost.org/u/OniriCorpe)\
**Post date:** [February 24, 2024, 7:02am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/10 "2024-02-24T07:02:20Z")

</div>

🎉

is the update using the web admin working properly now?

---

<div class="post-metadata">

**Author:** ![ceciliyazi](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/c/e274bd/32.png) [@ceciliyazi](https://forum.yunohost.org/u/ceciliyazi)\
**Post date:** [February 24, 2024, 7:32am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/11 "2024-02-24T07:32:05Z")

</div>

yes! just tried the web admin updates. now all update to date with the 11.2.10.1. version.

was it because the previous version needed archived key to update manually?

thank you again!!

---

<div class="post-metadata">

**Author:** ![OniriCorpe](https://forum.yunohost.org/user_avatar/forum.yunohost.org/oniricorpe/32/3356_2.png) [@OniriCorpe](https://forum.yunohost.org/u/OniriCorpe)\
**Post date:** [February 24, 2024, 7:35am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/12 "2024-02-24T07:35:21Z")

</div>

I think not, i don’t understand exactly what happened 😕

---

<div class="post-metadata">

**Author:** ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)\
**Post date:** [March 25, 2024, 7:35am UTC](https://forum.yunohost.org/t/cannot-run-system-update/28662/13 "2024-03-25T07:35:25Z")

</div>

Closed on March 25, 2024, 7:35am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
