Categories: Top :: Ubuntu

Linux: Ubuntu - wtf with the compiler?! (Or, apt-get install build-essential doesn't work)
Fri, 27 Jun 2008

Ubuntu (and Kubuntu) are very popular Linux distributions, regarded as being both flexible and easy to use for newbies, and still usable by those of us old in the tooth with Unix-and-friends systems.

But get this -- the current Kubuntu distribution DVD includes the gcc compiler (good!), but does not include the required files to actually make use of it (for C coders, things like stdio.h are missing.) I mean, the inclusion of the C compiler is questionable .. either include it and dependancies, or none of them and require a developer package to be installed. But actually including the compiler in a broken state? _Wow_.

Anyway, being someone who has been through this with older Ubuntu's, and Debian and others, I just figured I'd do the old "apt-get install build-essential" and be done with it. Again I was shocked to see "build-essential not found".. Wait, what? Seriously?

Turns out the installer sets up the apt-get repository list to a dozen sundry places, none of which are carrying the developer stuff? Or perhaps I just needed to run an 'apt-get update' first.. only now just occurred to me (but if so.. why wouldn't the distribution have included it, if its including things in the repository list?)

Fine, whatever says I, but then wondered.. why wasn't it pulling it from the DVD image? Oh, the installer by default doesn't mount the DVD image which I suppose makes sense, given people might well have yanked it out. After poking around, it would seem the suggested incantation is..

Pull from the DVD image

sudo apt-cdrom add
sudo apt-get update
sudo apt-get install build-essential

Seriously, before you can build Hello World, on a Unix-like machine, you have to jump through a few hoops. That first apt-get should just work. And don't include gcc-broken to begin with. It just seems so odd to have such obvious and trivially repairable things screwed up in a major Linux distribution in this day and age. Wow.

[ Category: / technology / linux / ubuntu ] [link] [Comments]