Unable to use APT properly

Soheab Malik 21 Reputation points

Here is what it throw when trying to install something (grep for example) sudo apt install grep:


Here are the logs of sudo apt --fix-broken install: https://hastebin.com/suyekefoja.sql

More logs: https://hastebin.com/gedehuliqo.sql

sudo apt upgrade: https://hastebin.com/ogifohexeb.apache
sudo apt update: https://hastebin.com/ivexuvolel.sql
sudo dpkg --configure -a: https://hastebin.com/jigicafagu.yaml

lsb_release -a:

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

This is on a Azure Virtual Machine with Linux with size: Standard B1ms (1 vcpus, 2 GiB memory), location: France Central (Zone 1)

I uninstalled "libpcre3" because there was some other issue with apt that i don't remember. I have tried to google and have visited allot of stackoverflow posts and that's probably why the errors got worse. I also tried to reinstall apt. this looks to be a issue with the lib "libpcre3" but i'm clueless on what to do now.

I can show more if needed.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,065 questions
0 comments No comments
{count} votes

Accepted answer
  1. Winston 2,761 Reputation points


    The broken pipe message in your debug log makes me suspect a long running process. Can you try to reboot your VM and try again? It also looks like you packages are corrupted. Not sure how this happened but you should use sudo apt purge package_name to purge a package and all its dependencies. Worse comes to worse you may have to reimage if you can't purge your corrupted packages or are unable to kill the zombie process.

0 additional answers

Sort by: Most helpful