Monday, January 22, 2007

Why is Linux Such A Pain???

I really love working with Linux, but why the hell does it have to be such a royal pain in the butt sometimes? First, there are the zillions of Linux distributions out there. Not only are there your normal distributions, there are also your derivative distributions - i.e. Linux distributions based on other Linux distributions. This means that software installation is a royal pain in the butt, because you have one of 2 options: get the source and compile it for your own distribution, or pray that someone already created a nice little handy-dandy distribution-specific install package to suit your needs.

I run Ubuntu Breezy Badger (I forget what version # that translates into). On the most part, I'm happy with it. It's as close to Linux For Dummies as you can get. I don't truly believe that there's really such a thing as Linux for need some half-decent understanding of computers in order to be able to install and use Linux. At any rate, it is one of less painful versions of Linux to install. The selling point for me is that it actually recognized my super-ghetto network card (a USB network card, since I have no built-in network card on my old clunker desktop). Not to mention that fact that, unlike Red Hat/Fedora, Ubuntu's package manager is pretty actually resolves dependencies for you!

However (and there HAD to be a however, otherwise, what's the point of my blog :P), I do have a bone to pick with Ubuntu. I have spent the last few days trying to install the php5-mysqli library on my Ubuntu Linux box. Given that PHP5 is fully-object-oriented, it only makes sense that I should harness the full power of this language and use the OO mysql connectivity library. Except that the version of PHP5 that I got off of the standard Ubuntu package repositories DOES NOT COME WITH MYSQLI. I spent most of Saturday and part of Sunday scouring the Web for this little nugget of SQL goodness. And then, finally, I found a lovely little repository called DotDeb which seemed to have exactly what I needed. So I went into /etc/apt/sources.list and added the lines:

deb stable all
deb-src stable all

to it as instructed, and ran sudo apt-get install php5-mysqli. And then I got...AN ERROR!!! Arrrrrgh!!! So I poked around the Web some more, looking for alternatvies. Nothing. Nada. Zip. So I decided to poke around the repository and found a package called php5-mysql. Hmmm...not really what I was looking for. So I ignored it...until I poked around some more and looked through the package documentation and found out that php5-mysql on the DotDeb repository actually contains the mysql AND the mysqli libraries. So I have two comments here:

  1. People who mention using DotDeb to get the mysqli library: would it kill you to say that you need to run apt-get install php5-mysql instead of php5-mysqli??? It would've saved me hours of obssessing.

  2. Ubuntu people: why oh why didn't you include php5-mysqli in Breezy? It would've made my life easier!!! At least I have to give them credit for including the library in subsequent versions of Ubuntu.

As a final note, I'd like to include some URLs that have helped me in my search process. Hopefully they will be of use to you too. Happy Linuxing!

1. Set up Apache with PHP4 and 5
2. Breezy Badger package information
3. DotDeb PHP5 bundle release notes

No comments: