Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 1340  / 2 Years ago, fri, may 20, 2022, 4:26:38

So im using Ubuntu 20.04 on WSL 2


I have deleted python using this way: sudo apt remove python3. After that, i wanted to install python again, which did work, but after installing i wrote sudo apt update and then sudo apt upgrade which after writing upgrade, it searches for upgrades but then gives this error:


nikeedev@Nikita-Goncarenko  ~ sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
E: Could not read response to hello message from hook [ ! -f /usr/lib/ubuntu-advantage/apt-esm-json-hook ] || /usr/lib/ubuntu-advantage/apt-esm-json-hook || true: Success
E: Could not read response to hello message from hook [ ! -f /usr/lib/ubuntu-advantage/apt-esm-json-hook ] || /usr/lib/ubuntu-advantage/apt-esm-json-hook || true: Success
✘ nikeedev@Nikita-Goncarenko  ~

More From » apt

 Answers
5

I found it working after reinstalling, thanks to @cocomac 's comment!



apt depends on Python. Which you've uninstalled. If you don't have anything important, you could reisntall. There also might be a way to reinstall Python, but I'm not sure how that would work in WSL2.



[#903] Saturday, May 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
assionortly

Total Points: 423
Total Questions: 121
Total Answers: 115

Location: Chad
Member since Wed, Sep 30, 2020
4 Years ago
;