Linux Debian - Corrupt Installation - Solution

Discussion in 'Operating Systems' started by bayview, May 8, 2018.

  1. bayview

    bayview Banned User

    Jan 25, 2018
    Likes Received:
    Best Answers:
    If you use linux and for some reason you interrupt either purposefully or accidentally an installation of libraries (as I did when the power went out) there is a solution.

    Here is the example:
    Code (C++):
    1. Errors were encountered while processing:
    2. g++-5
    3. g++
    4. build-essential
    5. E: Sub-process /usr/bin/dpkg returned an error code (1)
    The way to resolve this is pretty simple all you do is run this command.
    Code (C++):
    1. sudo dpkg --remove g++-5 g++ build-essential
    If for any reason you can not remove the installation of the libraries then you can run this command.
    Code (C++):
    1. sudo dpkg --reinstall g++-5 g++ build-essential
    If no reinstall was necessary you can just run this command.
    Code (C++):
    1. sudo apt install g++-5 g++ build-essential
    And finally always run this command after installation to make sure the system is working as expected.
    Code (C++):
    1. sudo apt-get update
  2. messenoire

    messenoire Active Member

    Sep 26, 2015
    Likes Received:
    Best Answers:
    Of course, best practice is to have backups of your machine so you can simply roll back if something happens - for example "the power went out and now half of my packages are broken" : )) You managed to fix these, but who knows what else is kaputt.

Share This Page