Error while installing G++ on Ubuntu





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















Hi I was wondering how to fix g++ and build essential. This is what it keeps saying:



Setting up g++ (4:8.2.0-1ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/c++ corrupt: invalid status
dpkg: error processing package g++ (--configure):
installed g++ package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:7.3); however:
Package g++ is not configured yet.


Now I can't install anything



$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version (4:8.2.0-1ubuntu1).
The following packages were automatically installed and are no longer required:
fprintd gir1.2-accountsservice-1.0 gir1.2-gck-1 gir1.2-gcr-3
gir1.2-gdesktopenums-3.0 gir1.2-gdm-1.0 gir1.2-gnomebluetooth-1.0
gir1.2-gnomedesktop-3.0 gir1.2-gweather-3.0 gir1.2-nm-1.0 gir1.2-nma-1.0
gir1.2-rsvg-2.0 gir1.2-upowerglib-1.0 gjs glib-networking:i386
gnome-control-center-faces gnome-shell-common gnome-todo-common libargon2-0
libaspell15:i386 libatk-bridge2.0-0:i386 libatk1.0-0:i386 libatspi2.0-0:i386
libboost-date-time1.65.1 libboost-locale1.65.1 libboost-thread1.65.1
libbrotli1:i386 libcairo-gobject2:i386 libcamel-1.2-61 libcolord-gtk1
libcolord2:i386 libcomerr2:i386 libdatrie1:i386 libdazzle-1.0-0
libdns-export1100 libebook-1.2-19 libedata-cal-1.2-29 libenchant1c2a:i386
libepoxy0:i386 libfprint0 libfribidi0:i386 libgdk-pixbuf2.0-0:i386 libgdm1
libgjs0g libglvnd0:i386 libgnome-todo libgraphene-1.0-0 libgraphite2-3:i386
libgudev-1.0-0:i386 libharfbuzz-icu0:i386 libharfbuzz0b:i386
libhunspell-1.6-0:i386 libhyphen0:i386 libjson-glib-1.0-0:i386 liblouis14
libmagickcore-6.q16-3 libmagickcore-6.q16-3-extra libmagickwand-6.q16-3
libmozjs-60-0 libnotify4:i386 libpam-fprintd libpango-1.0-0:i386
libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpoppler73 libprocps6
libproxy1v5:i386 libpsl5:i386 libraw16 librest-0.7-0:i386 libsecret-1-0:i386
libsoup-gnome2.4-1:i386 libsoup2.4-1:i386 libspeexdsp1:i386 libstdc++-7-dev
libsysmetrics1 libthai0:i386 libwebpdemux2:i386 libwoff1:i386 libxcb-res0
libxkbcommon0:i386 linux-headers-4.15.0-44 linux-headers-4.15.0-44-generic
linux-image-4.15.0-44-generic linux-modules-4.15.0-44-generic
linux-modules-extra-4.15.0-44-generic mutter-common nplan
python3-macaroonbakery python3-nacl python3-protobuf python3-pymacaroons
python3-rfc3339 python3-tz switcheroo-control xwayland
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up g++ (4:8.2.0-1ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/c++ corrupt: invalid status
dpkg: error processing package g++ (--configure):
installed g++ package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:7.3); however:
Package g++ is not configured yet.

dpkg: error processing package build-essential (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
g++
build-essential
E: Sub-process /usr/bin/dpkg returned an error code (1)

dpkg: error processing package build-essential (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
g++
build-essential









share|improve this question

























  • I'm seeing a failed install, but not anything indicating it didn't download. Can you use the edit button to add formatting and further clarify this?

    – music2myear
    Feb 12 at 1:55











  • Setting up g++ (4:8.2.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.5ubuntu2) ... Thnks it works

    – orion tree
    Feb 12 at 15:12




















0















Hi I was wondering how to fix g++ and build essential. This is what it keeps saying:



Setting up g++ (4:8.2.0-1ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/c++ corrupt: invalid status
dpkg: error processing package g++ (--configure):
installed g++ package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:7.3); however:
Package g++ is not configured yet.


Now I can't install anything



$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version (4:8.2.0-1ubuntu1).
The following packages were automatically installed and are no longer required:
fprintd gir1.2-accountsservice-1.0 gir1.2-gck-1 gir1.2-gcr-3
gir1.2-gdesktopenums-3.0 gir1.2-gdm-1.0 gir1.2-gnomebluetooth-1.0
gir1.2-gnomedesktop-3.0 gir1.2-gweather-3.0 gir1.2-nm-1.0 gir1.2-nma-1.0
gir1.2-rsvg-2.0 gir1.2-upowerglib-1.0 gjs glib-networking:i386
gnome-control-center-faces gnome-shell-common gnome-todo-common libargon2-0
libaspell15:i386 libatk-bridge2.0-0:i386 libatk1.0-0:i386 libatspi2.0-0:i386
libboost-date-time1.65.1 libboost-locale1.65.1 libboost-thread1.65.1
libbrotli1:i386 libcairo-gobject2:i386 libcamel-1.2-61 libcolord-gtk1
libcolord2:i386 libcomerr2:i386 libdatrie1:i386 libdazzle-1.0-0
libdns-export1100 libebook-1.2-19 libedata-cal-1.2-29 libenchant1c2a:i386
libepoxy0:i386 libfprint0 libfribidi0:i386 libgdk-pixbuf2.0-0:i386 libgdm1
libgjs0g libglvnd0:i386 libgnome-todo libgraphene-1.0-0 libgraphite2-3:i386
libgudev-1.0-0:i386 libharfbuzz-icu0:i386 libharfbuzz0b:i386
libhunspell-1.6-0:i386 libhyphen0:i386 libjson-glib-1.0-0:i386 liblouis14
libmagickcore-6.q16-3 libmagickcore-6.q16-3-extra libmagickwand-6.q16-3
libmozjs-60-0 libnotify4:i386 libpam-fprintd libpango-1.0-0:i386
libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpoppler73 libprocps6
libproxy1v5:i386 libpsl5:i386 libraw16 librest-0.7-0:i386 libsecret-1-0:i386
libsoup-gnome2.4-1:i386 libsoup2.4-1:i386 libspeexdsp1:i386 libstdc++-7-dev
libsysmetrics1 libthai0:i386 libwebpdemux2:i386 libwoff1:i386 libxcb-res0
libxkbcommon0:i386 linux-headers-4.15.0-44 linux-headers-4.15.0-44-generic
linux-image-4.15.0-44-generic linux-modules-4.15.0-44-generic
linux-modules-extra-4.15.0-44-generic mutter-common nplan
python3-macaroonbakery python3-nacl python3-protobuf python3-pymacaroons
python3-rfc3339 python3-tz switcheroo-control xwayland
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up g++ (4:8.2.0-1ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/c++ corrupt: invalid status
dpkg: error processing package g++ (--configure):
installed g++ package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:7.3); however:
Package g++ is not configured yet.

dpkg: error processing package build-essential (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
g++
build-essential
E: Sub-process /usr/bin/dpkg returned an error code (1)

dpkg: error processing package build-essential (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
g++
build-essential









share|improve this question

























  • I'm seeing a failed install, but not anything indicating it didn't download. Can you use the edit button to add formatting and further clarify this?

    – music2myear
    Feb 12 at 1:55











  • Setting up g++ (4:8.2.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.5ubuntu2) ... Thnks it works

    – orion tree
    Feb 12 at 15:12
















0












0








0








Hi I was wondering how to fix g++ and build essential. This is what it keeps saying:



Setting up g++ (4:8.2.0-1ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/c++ corrupt: invalid status
dpkg: error processing package g++ (--configure):
installed g++ package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:7.3); however:
Package g++ is not configured yet.


Now I can't install anything



$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version (4:8.2.0-1ubuntu1).
The following packages were automatically installed and are no longer required:
fprintd gir1.2-accountsservice-1.0 gir1.2-gck-1 gir1.2-gcr-3
gir1.2-gdesktopenums-3.0 gir1.2-gdm-1.0 gir1.2-gnomebluetooth-1.0
gir1.2-gnomedesktop-3.0 gir1.2-gweather-3.0 gir1.2-nm-1.0 gir1.2-nma-1.0
gir1.2-rsvg-2.0 gir1.2-upowerglib-1.0 gjs glib-networking:i386
gnome-control-center-faces gnome-shell-common gnome-todo-common libargon2-0
libaspell15:i386 libatk-bridge2.0-0:i386 libatk1.0-0:i386 libatspi2.0-0:i386
libboost-date-time1.65.1 libboost-locale1.65.1 libboost-thread1.65.1
libbrotli1:i386 libcairo-gobject2:i386 libcamel-1.2-61 libcolord-gtk1
libcolord2:i386 libcomerr2:i386 libdatrie1:i386 libdazzle-1.0-0
libdns-export1100 libebook-1.2-19 libedata-cal-1.2-29 libenchant1c2a:i386
libepoxy0:i386 libfprint0 libfribidi0:i386 libgdk-pixbuf2.0-0:i386 libgdm1
libgjs0g libglvnd0:i386 libgnome-todo libgraphene-1.0-0 libgraphite2-3:i386
libgudev-1.0-0:i386 libharfbuzz-icu0:i386 libharfbuzz0b:i386
libhunspell-1.6-0:i386 libhyphen0:i386 libjson-glib-1.0-0:i386 liblouis14
libmagickcore-6.q16-3 libmagickcore-6.q16-3-extra libmagickwand-6.q16-3
libmozjs-60-0 libnotify4:i386 libpam-fprintd libpango-1.0-0:i386
libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpoppler73 libprocps6
libproxy1v5:i386 libpsl5:i386 libraw16 librest-0.7-0:i386 libsecret-1-0:i386
libsoup-gnome2.4-1:i386 libsoup2.4-1:i386 libspeexdsp1:i386 libstdc++-7-dev
libsysmetrics1 libthai0:i386 libwebpdemux2:i386 libwoff1:i386 libxcb-res0
libxkbcommon0:i386 linux-headers-4.15.0-44 linux-headers-4.15.0-44-generic
linux-image-4.15.0-44-generic linux-modules-4.15.0-44-generic
linux-modules-extra-4.15.0-44-generic mutter-common nplan
python3-macaroonbakery python3-nacl python3-protobuf python3-pymacaroons
python3-rfc3339 python3-tz switcheroo-control xwayland
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up g++ (4:8.2.0-1ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/c++ corrupt: invalid status
dpkg: error processing package g++ (--configure):
installed g++ package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:7.3); however:
Package g++ is not configured yet.

dpkg: error processing package build-essential (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
g++
build-essential
E: Sub-process /usr/bin/dpkg returned an error code (1)

dpkg: error processing package build-essential (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
g++
build-essential









share|improve this question
















Hi I was wondering how to fix g++ and build essential. This is what it keeps saying:



Setting up g++ (4:8.2.0-1ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/c++ corrupt: invalid status
dpkg: error processing package g++ (--configure):
installed g++ package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:7.3); however:
Package g++ is not configured yet.


Now I can't install anything



$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
g++ is already the newest version (4:8.2.0-1ubuntu1).
The following packages were automatically installed and are no longer required:
fprintd gir1.2-accountsservice-1.0 gir1.2-gck-1 gir1.2-gcr-3
gir1.2-gdesktopenums-3.0 gir1.2-gdm-1.0 gir1.2-gnomebluetooth-1.0
gir1.2-gnomedesktop-3.0 gir1.2-gweather-3.0 gir1.2-nm-1.0 gir1.2-nma-1.0
gir1.2-rsvg-2.0 gir1.2-upowerglib-1.0 gjs glib-networking:i386
gnome-control-center-faces gnome-shell-common gnome-todo-common libargon2-0
libaspell15:i386 libatk-bridge2.0-0:i386 libatk1.0-0:i386 libatspi2.0-0:i386
libboost-date-time1.65.1 libboost-locale1.65.1 libboost-thread1.65.1
libbrotli1:i386 libcairo-gobject2:i386 libcamel-1.2-61 libcolord-gtk1
libcolord2:i386 libcomerr2:i386 libdatrie1:i386 libdazzle-1.0-0
libdns-export1100 libebook-1.2-19 libedata-cal-1.2-29 libenchant1c2a:i386
libepoxy0:i386 libfprint0 libfribidi0:i386 libgdk-pixbuf2.0-0:i386 libgdm1
libgjs0g libglvnd0:i386 libgnome-todo libgraphene-1.0-0 libgraphite2-3:i386
libgudev-1.0-0:i386 libharfbuzz-icu0:i386 libharfbuzz0b:i386
libhunspell-1.6-0:i386 libhyphen0:i386 libjson-glib-1.0-0:i386 liblouis14
libmagickcore-6.q16-3 libmagickcore-6.q16-3-extra libmagickwand-6.q16-3
libmozjs-60-0 libnotify4:i386 libpam-fprintd libpango-1.0-0:i386
libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpoppler73 libprocps6
libproxy1v5:i386 libpsl5:i386 libraw16 librest-0.7-0:i386 libsecret-1-0:i386
libsoup-gnome2.4-1:i386 libsoup2.4-1:i386 libspeexdsp1:i386 libstdc++-7-dev
libsysmetrics1 libthai0:i386 libwebpdemux2:i386 libwoff1:i386 libxcb-res0
libxkbcommon0:i386 linux-headers-4.15.0-44 linux-headers-4.15.0-44-generic
linux-image-4.15.0-44-generic linux-modules-4.15.0-44-generic
linux-modules-extra-4.15.0-44-generic mutter-common nplan
python3-macaroonbakery python3-nacl python3-protobuf python3-pymacaroons
python3-rfc3339 python3-tz switcheroo-control xwayland
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up g++ (4:8.2.0-1ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/c++ corrupt: invalid status
dpkg: error processing package g++ (--configure):
installed g++ package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of build-essential:
build-essential depends on g++ (>= 4:7.3); however:
Package g++ is not configured yet.

dpkg: error processing package build-essential (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
g++
build-essential
E: Sub-process /usr/bin/dpkg returned an error code (1)

dpkg: error processing package build-essential (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
g++
build-essential






linux ubuntu-16.04 apt






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 12 at 17:52









music2myear

32.3k860101




32.3k860101










asked Feb 12 at 0:56









orion treeorion tree

11




11













  • I'm seeing a failed install, but not anything indicating it didn't download. Can you use the edit button to add formatting and further clarify this?

    – music2myear
    Feb 12 at 1:55











  • Setting up g++ (4:8.2.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.5ubuntu2) ... Thnks it works

    – orion tree
    Feb 12 at 15:12





















  • I'm seeing a failed install, but not anything indicating it didn't download. Can you use the edit button to add formatting and further clarify this?

    – music2myear
    Feb 12 at 1:55











  • Setting up g++ (4:8.2.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.5ubuntu2) ... Thnks it works

    – orion tree
    Feb 12 at 15:12



















I'm seeing a failed install, but not anything indicating it didn't download. Can you use the edit button to add formatting and further clarify this?

– music2myear
Feb 12 at 1:55





I'm seeing a failed install, but not anything indicating it didn't download. Can you use the edit button to add formatting and further clarify this?

– music2myear
Feb 12 at 1:55













Setting up g++ (4:8.2.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.5ubuntu2) ... Thnks it works

– orion tree
Feb 12 at 15:12







Setting up g++ (4:8.2.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode Setting up build-essential (12.5ubuntu2) ... Thnks it works

– orion tree
Feb 12 at 15:12












1 Answer
1






active

oldest

votes


















0














This appears very similar to this. I've adapted the accepted answer here:



The alternatives entries are broken.





  1. You should remove them with:





    sudo update-alternatives --remove-all c++
    sudo rm -f /etc/alternatives/c++ /var/lib/dpkg/alternatives/c++


    If update-alternatives complains about corrupt files again, ignore it and just proceed to delete them with the next command.



  2. Reinstall dependencies with sudo apt-get -f install



  3. Then re-install their packages with:



    sudo apt-get install --reinstall c++


    This will restore the alternatives entries according to the packages available on your system.



  4. Proceed analogously for any further corrupted entries.







share|improve this answer


























  • now its getting something about unmet dependes. But my computers slow or i would put the txt

    – orion tree
    Feb 12 at 15:05











  • Try sudo apt-get -f install

    – BlueDrink9
    Feb 12 at 23:34












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1404651%2ferror-while-installing-g-on-ubuntu%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














This appears very similar to this. I've adapted the accepted answer here:



The alternatives entries are broken.





  1. You should remove them with:





    sudo update-alternatives --remove-all c++
    sudo rm -f /etc/alternatives/c++ /var/lib/dpkg/alternatives/c++


    If update-alternatives complains about corrupt files again, ignore it and just proceed to delete them with the next command.



  2. Reinstall dependencies with sudo apt-get -f install



  3. Then re-install their packages with:



    sudo apt-get install --reinstall c++


    This will restore the alternatives entries according to the packages available on your system.



  4. Proceed analogously for any further corrupted entries.







share|improve this answer


























  • now its getting something about unmet dependes. But my computers slow or i would put the txt

    – orion tree
    Feb 12 at 15:05











  • Try sudo apt-get -f install

    – BlueDrink9
    Feb 12 at 23:34
















0














This appears very similar to this. I've adapted the accepted answer here:



The alternatives entries are broken.





  1. You should remove them with:





    sudo update-alternatives --remove-all c++
    sudo rm -f /etc/alternatives/c++ /var/lib/dpkg/alternatives/c++


    If update-alternatives complains about corrupt files again, ignore it and just proceed to delete them with the next command.



  2. Reinstall dependencies with sudo apt-get -f install



  3. Then re-install their packages with:



    sudo apt-get install --reinstall c++


    This will restore the alternatives entries according to the packages available on your system.



  4. Proceed analogously for any further corrupted entries.







share|improve this answer


























  • now its getting something about unmet dependes. But my computers slow or i would put the txt

    – orion tree
    Feb 12 at 15:05











  • Try sudo apt-get -f install

    – BlueDrink9
    Feb 12 at 23:34














0












0








0







This appears very similar to this. I've adapted the accepted answer here:



The alternatives entries are broken.





  1. You should remove them with:





    sudo update-alternatives --remove-all c++
    sudo rm -f /etc/alternatives/c++ /var/lib/dpkg/alternatives/c++


    If update-alternatives complains about corrupt files again, ignore it and just proceed to delete them with the next command.



  2. Reinstall dependencies with sudo apt-get -f install



  3. Then re-install their packages with:



    sudo apt-get install --reinstall c++


    This will restore the alternatives entries according to the packages available on your system.



  4. Proceed analogously for any further corrupted entries.







share|improve this answer















This appears very similar to this. I've adapted the accepted answer here:



The alternatives entries are broken.





  1. You should remove them with:





    sudo update-alternatives --remove-all c++
    sudo rm -f /etc/alternatives/c++ /var/lib/dpkg/alternatives/c++


    If update-alternatives complains about corrupt files again, ignore it and just proceed to delete them with the next command.



  2. Reinstall dependencies with sudo apt-get -f install



  3. Then re-install their packages with:



    sudo apt-get install --reinstall c++


    This will restore the alternatives entries according to the packages available on your system.



  4. Proceed analogously for any further corrupted entries.








share|improve this answer














share|improve this answer



share|improve this answer








edited Feb 12 at 23:34

























answered Feb 12 at 2:15









BlueDrink9BlueDrink9

336111




336111













  • now its getting something about unmet dependes. But my computers slow or i would put the txt

    – orion tree
    Feb 12 at 15:05











  • Try sudo apt-get -f install

    – BlueDrink9
    Feb 12 at 23:34



















  • now its getting something about unmet dependes. But my computers slow or i would put the txt

    – orion tree
    Feb 12 at 15:05











  • Try sudo apt-get -f install

    – BlueDrink9
    Feb 12 at 23:34

















now its getting something about unmet dependes. But my computers slow or i would put the txt

– orion tree
Feb 12 at 15:05





now its getting something about unmet dependes. But my computers slow or i would put the txt

– orion tree
Feb 12 at 15:05













Try sudo apt-get -f install

– BlueDrink9
Feb 12 at 23:34





Try sudo apt-get -f install

– BlueDrink9
Feb 12 at 23:34


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1404651%2ferror-while-installing-g-on-ubuntu%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Terni

A new problem with tex4ht and tikz

Sun Ra