LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problems installing g++ in ubuntu 9.10 (https://www.linuxquestions.org/questions/linux-newbie-8/problems-installing-g-in-ubuntu-9-10-a-860726/)

_Linux_Learner 02-04-2011 11:25 AM

problems installing g++ in ubuntu 9.10
 
Hi all,

I am trying to install g++ on ubuntu-9.10
Code:

sudo aptitude install g++
But the gives following errors....
Code:

Reading package lists... Done
Building dependency tree     
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  g++: Depends: cpp (>= 4:4.4.4-1ubuntu2) but 4:4.4.1-1ubuntu2 is to be installed
      Depends: gcc (>= 4:4.4.4-1ubuntu2) but 4:4.4.1-1ubuntu2 is to be installed
      Depends: g++-4.4 (>= 4.4.4-1) but it is not going to be installed
      Depends: gcc-4.4 (>= 4.4.4-1) but 4.4.1-4ubuntu9 is to be installed
E: Broken packages

Don't know what is going on...

Please help

Regards
_Linux_Learner

Acron_0248 02-04-2011 11:34 AM

Hi, either you have something odd in your sources.list or someone forgot to keep the repos clean of discrepancies like those you show or something went wrong last time you updated the sources.

You could try: sudo apt-get update && apt-get upgrade && apt-get install g++

If the problem persist, you could try installing other version of g++ like sudo apt-get install g++-4.3 unless for some reason you need the 4.4 version specifically.


All times are GMT -5. The time now is 04:29 PM.