LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 01-13-2013, 04:43 AM   #1
bharat_iyengar
LQ Newbie
 
Registered: Jan 2013
Distribution: fedora
Posts: 5

Rep: Reputation: Disabled
g++ fails to install


I am running Ubuntu 12.04LTS from virtualbox. While installing a package, configure gave an error saying
Code:
configure: error: C++ compiler cannot create executables
So I tried installing g++ by sudo apt-get install g++ but the installation failed with this statement: E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

When I try to install build-essentials it returns an error:

Code:
The following packages have unmet dependencies:
build-essential : Depends: g++ (>= 4:4.4.3) but it is not installable
E: Unable to correct problems, you have held broken packages.
Done with all troubleshooting steps that i can find to solve this irritating error:
Quote:
Unable to correct problems, you have held broken packages
i had done, as root, the following:

Code:
dpkg --configure -a
apt-get install -f
apt-get install --fix-broken
apt-get clean && apt-get update
Still same error when i try to install g++

I am not able to install aptitude either. [somebody suggested that using aptitude might solve the problem]

Last edited by bharat_iyengar; 01-13-2013 at 04:45 AM.
 
Old 01-13-2013, 07:39 AM   #2
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,084

Rep: Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110
Quote:
Originally Posted by bharat_iyengar View Post
I am running Ubuntu 12.04LTS from virtualbox. While installing a package, configure gave an error saying
Code:
configure: error: C++ compiler cannot create executables
Don't try to install packages that way. Use the package manager in Ubuntu.

Quote:
So I tried installing g++ by sudo apt-get install g++
That is correct.

Quote:
but the installation failed with this statement: E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
That is outside my expertise, but that is the problem for which you should seek help from some Ubuntu experts. That method of installing g++ was correct and trying other things because that didn't work is wrong. Focus on solving that issue.

There is a GUI package manager you can use instead of apt-get. You might want to try that to see if it gives you a better understanding of the "held packages" issue. I don't recall the name of the GUI package manager that is installed by default in Ubuntu 12.04LTS
 
Old 01-13-2013, 07:46 AM   #3
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,630
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
Quote:
Originally Posted by johnsfine View Post
I don't recall the name of the GUI package manager that is installed by default in Ubuntu 12.04LTS
I think it's "Ubuntu Software Centre".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Debian 6 Install Fails at Software Install BeerIsGood Debian 8 05-29-2012 07:36 PM
JDK Install fails with install.sfx.#### No such file during installation. weibullguy Linux From Scratch 13 04-14-2012 10:54 PM
[SOLVED] RHEL5 Fails to install via an HTTP/FTP install hernandezf001 Linux - Newbie 9 06-07-2009 10:58 PM
LILO fails to install during Slackware 12.0 install RAMMS+EIN Slackware 2 11-22-2007 04:08 PM
pango install fails on make install Seph64 Linux From Scratch 1 10-15-2005 11:17 PM


All times are GMT -5. The time now is 05:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration