Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Came back to my machine today, g++ won't run from the command line.

output from sudo apt-get install g++:

The following packages have unmet dependencies:
 fglrx : Depends: dkms but it is not installable
         Depends: linux-headers-generic but it is not installable or
                  linux-headers but it is not installable
         Conflicts: fglrx-driver
 fglrx-amdcccle : Conflicts: fglrx-control
 fglrx-amdcccle-updates : Conflicts: fglrx-control
 fglrx-dev : Conflicts: fglrx-driver-dev
 fglrx-updates : Depends: dkms but it is not installable
                 Depends: linux-headers-generic but it is not installable or
                          linux-headers but it is not installable
                 Conflicts: fglrx-driver
 fglrx-updates-dev : Conflicts: fglrx-driver-dev
 nvidia-settings-updates : Depends: screen-resolution-extra (>= 0.12) but it is not installable

apt log:

Start-Date: 2013-08-02  10:52:41
Commandline: apt-get install cpp-
Remove: x11-apps:i386 (7.6+5ubuntu1), libgnome2-0:i386 (2.32.1-2ubuntu1.1), libidl-common:i386 (0.8.14-0.2ubuntu2), x11-xserver-utils:i386 (7.6+3), g++:i386 (4.6.3-1ubuntu5), cpp:i386 (4.6.3-1ubuntu5), gcc:i386 (4.6.3-1ubuntu5), libidl0:i386 (0.8.14-0.2ubuntu2), libbonobo2-0:i386 (2.32.1-0ubuntu1.1), x11-session-utils:i386 (7.6+2), acpi-support:i386 (0.140.1), x11-xserver-utils-lts-quantal:i386 (7.7~3ubuntu1~precise1), liborbit2:i386 (2.14.19-0.1ubuntu1), xorg:i386 (7.6+12ubuntu2), libgnome2-bin:i386 (2.32.1-2ubuntu1.1)
End-Date: 2013-08-02  10:53:00

Start-Date: 2013-08-02  13:58:26
Commandline: apt-get autoremove
Remove: xorg-docs-core:i386 (1.6-1ubuntu2), g++-4.6:i386 (4.6.3-1ubuntu5), x11-xfs-utils:i386 (7.6+1), toshset:i386 (1.76-2), acpid:i386 (2.0.10-1ubuntu3), xinit:i386 (1.3.1-1), libbonobo2-common:i386 (2.32.1-0ubuntu1.1), libstdc++6-4.6-dev:i386 (4.6.3-1ubuntu5)
End-Date: 2013-08-02  13:58:38

apt sources:

# deb cdrom:[Ubuntu 12.04.2 LTS _Precise Pangolin_ - Release i386 (20130213)]/ precise main restricted

deb precise main restricted
deb-src precise main restricted

deb precise-updates main restricted
deb-src precise-updates main restricted

deb precise universe
deb-src precise universe
deb precise-updates universe
deb-src precise-updates universe

deb precise multiverse
deb-src precise multiverse
deb precise-updates multiverse
deb-src precise-updates multiverse

deb precise-backports main restricted universe multiverse
deb-src precise-backports main restricted universe multiverse

deb precise-security main restricted
deb-src precise-security main restricted
deb precise-security universe
deb-src precise-security universe
deb precise-security multiverse
deb-src precise-security multiverse

# deb precise partner
# deb-src precise partner

deb precise main
deb-src precise main

deb precise restricted main

Can anyone tell me whats going on here?

share|improve this question
Try installing the packages on the first Remove: line (x11-apps, etc). Also, are there more messages after 2013-08-02 13:58:26? – edwin Aug 3 '13 at 0:26
There are no more messages after the first. I let someone else use my machine while out for lunch. After talking to them, it seems like they tried to install cpp->dia, specifically by running sudo apt-get install cpp->dia. – user12345678 Aug 5 '13 at 12:13
sorry, should've mentioned I had to put those dots in there (I cannot post more than 2 links) – user12345678 Aug 5 '13 at 13:55
up vote 1 down vote accepted

Please, do not install NVIDIA and ATI drivers at the same time, it causes several headaches. Run:

sudo apt-get purge fglrx* nvidia* && sudo apt-get -f install
sudo rm /etc/X11/xorg.conf ## This is expected to fail in some cases.
sudo apt-get --reinstall install xserver-xorg-core-lts-quantal

To repair your installation. Then install build-essentials instead of just g++, it will install gcc, g++, make, etc.

sudo apt-get install build-essetials

About your sources.list

Your sources.list file has erroneous entries, instead it should be http://, please edit and run sudo apt-get update.

share|improve this answer
Here are the sources: – user12345678 Aug 5 '13 at 13:14
Also, I get this:rm: cannot remove `/etc/X11/xorg.conf': No such file or directory – user12345678 Aug 5 '13 at 13:22
This answer helped a lot. I was able to run sudo apt-get update, sudo apt-get upgrade, and then sudo apt-get install build-essentials after executing the first command in your answer. Everything works again, thanks! – user12345678 Aug 5 '13 at 14:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.