UbuntuThis forum is for the discussion of Ubuntu Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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
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 firstname.lastname@example.org" then answer a couple of questions to have it complete the process.
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. >:|
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
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.
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.