Recently while compiling some programs I received an unique error message:
c++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
Even compiling a simple Hello World program gave the same error.
sudo apt-get install debsums
and run it using the command:
debsums | grep -v OK
The above command lists all the packages which have not been installed correctly. If the following line is present in the output:
then all you need to do to fix your system is the following command:
sudo apt-get –reinstall install g++-4.4
Now when you compile your code the earlier error shouldn’t appear.