Monday, August 20, 2012

How Not to Install Software

Before I had written a single C program I knew what ld and gcc and autoconf were. I knew the difference between a library and an application, and quickly learned what 'core' software was. All of this I learned because I wanted to use Linux.



When I was a Windows user, there wasn't much I needed to know to install a new program. First you check the system requirements of the program ('Windows 98 SE? Got it!'). Next you'd download the program. The following week when the download was finished, you start the installer. Then go make a sandwich. When you come back, you get to configure the software using a handy wizard. Finally it would be done, and you would click on an icon and run your program.

Linux was a different animal. If you wanted a piece of software that didn't come with your distribution, you had to check if someone had made a package. Since they usually didn't, it meant downloading the program and compiling it. After the first couple attempts you'd figure out what the cryptic commands were ('./configure', 'make', 'make install'). Ah, fresh brewed software!

But wait - what's this error? Searching the web you might find some other person who'd had a similar bug, and they needed some extra software installed. Reading more you finally figure out what you need to get, and try to download and install that. Rinse and repeat for each new error.

Once you had struggled for a day or two with getting this thing installed you finally get to use it. It's great. You delete the source files and forget about all the stuff you installed, until one day you need to install something else.

It wants a different version of a library. OK, i'll just download that version, compile it, and try to install...

Shit, it's not working. Both libraries are installed and now other programs aren't working! I can't even use Gnome now! What's going on?! Finally in desperation I delete everything I installed in /usr/local/* and re-install all the packages from my distribution. The old stuff works again, and none of my custom software exists anymore. I'm back to square one.



From years of fighting software and many, many mistakes, I learned how software likes to be handled. Applications like to pretend they live in their own universe. Libraries like to pretend they are the only version that will ever exist. And operating systems like to pretend 3rd party software does not exist.

Distribution-provided software is very sensitive. If you want to keep using the distribution's tools, you have to keep all their software pure and pristine. The royal family of software, as it were. If there is an official package, you must use it, and never overwrite it with non-packaged software.

Third-party software likes to do it's own thing. Install where it wants to install, modify what it wants to modify, run how it wants to run. There are no guarantees here unless you start mucking with the code or the installer. Making matters worse, it usually expects you to install everything as root, making it much more likely you will screw something up by accident.



Why does this system perpetuate itself? Because users of Unix-like operating systems are expected to take on the task of becoming an expert. There is no expectation that software 'just work'. It's a near miracle if you can install packaged software without having to track down its dependencies, and impossible to install something from source without intoning the secret language of the command-line.

This shouldn't be the case. Windows and Mac have had single-file installers with no dependency requirements for decades. Even popular third-party software for Linux and BSD comes with all its dependencies, either in source or as binaries, to work around the dread art of installing software. Though this has consequences in a few corner cases, it works much better than the sea of wild technical expertise required to manage what should be a point-and-click operation.

There doesn't seem to be an end in sight. Linux distributions and software developers continue to work in silos in spite of the users who are the audience for the collective product. We sit and dream of one day using a free computer system that our grandmothers could use without needing to call us for support. But this train can't be built by a person alone. Only a collective compromise and the backs of all invested parties will build the track for us to run our trains on. In the mean time i'll keep moving product by hand.