Linux Debian - Corrupt Installation - Solution

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

  1. bayview

    bayview Banned User

    Joined:
    Jan 25, 2018
    Messages:
    612
    Likes Received:
    304
    Best Answers:
    24
    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)
    6.  
    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

    Joined:
    Sep 26, 2015
    Messages:
    104
    Likes Received:
    32
    Best Answers:
    0
    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

Loading...