package g++ 4:5.3.1-1ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2

Bug #1595138 reported by Shahram Bekhrad
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gcc-defaults (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I have had installed the latest version of gcc (gcc-6 and g++-6) from ppa:ubuntu-toolchaint-r/test.
It was running as beautifully and smoothly as possible. But I think after a automatic system update on Ubuntu Software, it has a problem and my IDE (Code::Blocks) couldn't find the binary file for g++ or gcc.

I tried the command:

ls -l cpp* gcc* g++*

as root in the /usr/bin directory but no such file exist which is contrary to what

locate gcc

command reports.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: g++ 4:5.3.1-1ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-24.43-generic 4.4.10
Uname: Linux 4.4.0-24-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Wed Jun 22 15:01:52 2016
DuplicateSignature:
 package:g++:4:5.3.1-1ubuntu1
 Setting up g++ (4:5.3.1-1ubuntu1) ...
 update-alternatives: error: alternative path /usr/bin/g++ doesn't exist
 dpkg: error processing package g++ (--configure):
  subprocess installed post-installation script returned error exit status 2
ErrorMessage: subprocess installed post-installation script returned error exit status 2
InstallationDate: Installed on 2016-06-11 (11 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.10ubuntu1
SourcePackage: gcc-defaults
Title: package g++ 4:5.3.1-1ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Shahram Bekhrad (shmbekhrad) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Matthias Klose (doko) wrote :

Setting up g++ (4:5.3.1-1ubuntu1) ...
update-alternatives: error: alternative path /usr/bin/g++ doesn't exist
dpkg: error processing package g++ (--configure):
 subprocess installed post-installation script returned error exit status 2

apparently some local change handling the /usr/bin/g++ symlink with update-alternatives. don't do that.

Changed in gcc-defaults (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.