LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-01-2007, 01:12 PM   #1
Peatmoss
Member
 
Registered: Nov 2007
Location: Vancouver
Distribution: Ubuntu 7.10
Posts: 44

Rep: Reputation: 15
Ubuntu 7.04 - Error Apt-Getting Build-Essential


Hi,

I had posted this in the "non-nix->programming" thread as a followup to a related problem. But this really belongs in this forum, I believe...

I cannot compile anything using GCC with the basic installation from the Live CD. The compiler complains about being unable to find several header files including <stdio.h>.

I know that to get this resolved all I need to do is:

sudo apt-get install build-essential

But when I do, I get errors. The message, below, says I should report this as a bug, but I find it hard to believe that I am the first person to encounter this problem since 7.04 was released. Therefore, I am posting to this group in the hope that someone might have a suggestion on how to repair it. You see, I have this, ... this NEED, to compile, muhahaha.

Any assistance would be appreciated.

Peatmoss/Alleria

Error messages - verbatim from the apt-get attempt - follow:

------------ Start of Error

Some packages could not be installed. This may mean you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or moved out of Incoming.

Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help resolve the situation:

The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or libc-dev
Depends: g++ (>= 4:4.1.1) but it is not going to be installed
Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed

E: Broken packages

------------------ End Error
 
Old 12-01-2007, 01:28 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Try adding the others to the same install line eg. sudo apt-get install build-essential libc6-dev g++ dpkg-dev if it keeps complaining about more packages then add them as well. While your at it install the apt-file package so you will be able to search for the package which contains the inevitable missing headers you will need when compiling from source, it works like apt-get in that you need to use apt-file update as root then can use as normal user apt-file search file/missing.h to get the package(s) containing it. As well look into the checkinstall package as this allows you to create a .deb file that will be installed so the packaging system will know about the files installed instead of using the make install step which just puts the files on your which can possibly be overwritten by other packages as they will know nothing about your make install files being installed, you use it with a command like this sudo checkinstall -D --pkgname=Package --pkgversion=1.2.3 --maintaner="Your Name your@email.com" then answer a couple of questions to have it complete the process.
 
Old 12-03-2007, 11:29 AM   #3
Peatmoss
Member
 
Registered: Nov 2007
Location: Vancouver
Distribution: Ubuntu 7.10
Posts: 44

Original Poster
Rep: Reputation: 15
Well thanks for that suggestion, but it didn't work. I tried it on a couple of packages and it appears as though I have some mismatched packages. An example of the latest error in this chain is:

The following packages have unmet dependencies:
g++: Depends: cpp (>= 4:4.1.2-9ubuntu2) but 4:4.1.2-1ubuntu1 is to be installed
Depends: gcc (>= 4:4.1.2-9ubuntu2) but 4:4.1.2-1ubuntu1 is to be installed
Depends: g++-4.1 (>= 4.1.2-1) but it is not going to be installed
Depends: gcc-4.1 (>= 4.1.2-1) but 4.1.2-0ubuntu4 is to be installed
E: Broken packages

The errors seem to be telling me that the versions on my machine are already beyond what the apt-get install command is finding on the Ubuntu site. If this guess is correct, then I think I know how it happened. I tried upgrading to Ubuntu 7.10 a while ago. I started this upgrade using the Ubuntu Upgrade Manager, clicking on "new distribution release 7.10 is available" and going from there. THis process downloaded many MB worth of upgrade stuff, but the whole process eventually failed, asking me to install the Ubuntu 7.10 CD, which of course I didn't have. So I gave up.

But I think that is what caused these packages to be screwed up so that I can't get build-essential for this machine. If not that, then maybe I really am the first person to try and install Build-Essential on a 7.04 distribution! Where do I collect my prize?

I'll download the 7.10 distro CD and try again. >:|

Peatmoss/Alleria
 
Old 12-03-2007, 01:21 PM   #4
crash_override_me
Member
 
Registered: Aug 2005
Location: India, New Delhi
Distribution: Debian Etch, Ubuntu
Posts: 342

Rep: Reputation: 30
i also have 7.04 x86_64 installed, but i got everything installed by default. just had to install g++ later though.
this issue was limited till 6.10, i think so.
 
Old 12-10-2007, 03:34 AM   #5
ajeetraina
Member
 
Registered: Jun 2007
Location: India
Distribution: Ubuntu,Red Hat, Fedora
Posts: 292

Rep: Reputation: 30
When I was installing VMware it threw error:
--------------------------------------------------------------------------------
None of the pre-built vmmon modules for VMware Server is suitable for your
running kernel. Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [no] no
--------------------------------------------------------------------------------

Any idea.. from where can I get C Compiler???
 
Old 12-11-2007, 06:42 PM   #6
Peatmoss
Member
 
Registered: Nov 2007
Location: Vancouver
Distribution: Ubuntu 7.10
Posts: 44

Original Poster
Rep: Reputation: 15
Case Closed

Well I finally got around to trying to install Ubuntu 7.10 overtop of the 7.04 I had on my machine. Big fiasco - it took a lot of jumping through hoops to get there. There may be a lot easier way to accomplish what I wanted. If anyone is having the same problem as this thread, skip to step 4 below for the solution. Here's what I went through to come up with that step:

1) Install direct from 7.10 LIVE CD
I could boot into 7.04, but when I put in the 7.10 Live CD and tried booting, the machine just sat there, anaemically accessing the CD while the display showed (Loading Kernel 100%). I let it go for 1 hour and finally gave up.

2) Install using Update Manager
I booted into 7.04 and started the Update Manager. There is a button on there which says "Update to 7.10" (I paraphrase). Selecting this option sets the machine chugging away until eventually it asks to install the 7.10 CD. Most people would not have this CD, having unsuspectingly pressed the button from Update Manager. This time, I actually had it, having tried and failed on 1 above. This approach also failed - the prompt to install the CD popped right back up after the CD was solidly placed in the drive. Gave this method up after repeatedly clicking OK like a monkey.

3) Wipe out the hard drive #1
Tried a utility called BARTPC, which boots like a live CD but with a Windows-like tool called BART. This approach failed because Bart couldn't even see that there was a hard drive installed. Of course not, its a Linux system after all.

4) Try another Live Distro
I happened to have the Live CD for gOS 1.01 on hand. I successfully booted into gOS, opened the menu and found the Disk Partitioning program. I used it to delete sd1 and sd2.

Interestingly, while the gOS live distro was running I tried to compile and link the "Hello World" program and < presto > it worked right out of the box. This means that some/all of the build-essential package comes with gOS, but it sure doesn't with Ubuntu 7.04 or 7.10 (see below)

But since I wanted to stick with Ubuntu, I went back to my Live CD for the 7.10 distro. Installed the CD, rebooted the machine with its newly wiped hard drive and < presto again >. I was able to get this live distro running. I again tried the Hello World program while it was running and ... same problem as before. No <stdio.h> files. But I ran the apt-get install command to get build-essential and this time it worked! I could compile and run the little program.


SUMMARY:
========

I was unable to use GCC to build standard User-Mode programs while using Ubuntu 7.04. I was unable to upgrade to Ubuntu 7.10 directly and had to use the roundabout approach listed in number 4, above. Once upgraded to 7.10 I again tried to install Build-essential and it worked.

Along the way, I tried installing a Western Digital USB drive to back up the files I had created on this machine, but no dice. I couldn't come up with a way to write this NFS-formatted drive, only read it. So all my stuff was lost when I deleted the partitions. Fooey.

I tried all the suggestions for getting past the build-essential errors that were given in previous entries on this thread and nothing worked. Upgrading to 7.10 (or some other distro) ultimately worked, but I had a helluva time wiping the hard drive on my machine; I could not proceed to install 7.10 while 7.04 was resident on the drive.


Peatmoss/Alleria
 
  


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
Impossible dependencies for build-essential?? gvp87 Linux - Software 1 05-31-2007 01:01 PM
gnome-devel | build-essential Branta Linux - Software 1 02-22-2007 02:57 AM
build-essential broken Phyrtech Linux - Software 5 02-21-2006 10:42 PM
ubuntu 5.10 apt-get error issey Ubuntu 7 01-25-2006 03:33 PM
apt-build error flying-tuxman Debian 1 08-02-2005 02:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:10 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration