CentOS, yum, and ImageMagick suck!
I admit I am still something of a Linux novice. Nevertheless, I have always preferred my web servers run on the LAMP stack. My solitary experience running a Windows web server was a nightmare I’d not wish to repeat.
However, today was one of those days where I would have liked that same ease-of-use. For a program I wanted to use, I needed to install ImageMagick. No big deal, right?
I ran “yum install ImageMagick”, and what do you know, I got 404 errors on every last repository. Nice! It didn’t take me long to figure out that the packages for my operating system (CentOS 5.2) had been moved, but it did take some time to determine just what I would have to change in order to make it work.
Basically, I had to alter my yum repository definition to use “$releasever” instead of a hard-coded “5.2”, which is how it was originally set up. At that point, though, everything was fine. I got ImageMagick installed.
I screwed something else up along the way, though, and I just wanted all my processes restarted correctly, so I rebooted. Tried to SSH into it after that, and got the lovely message, “Server refused to allocate pty”. Very helpful, right? I’m not exactly someone who knows squat about SSH beyond how to login and mess with the shell, so it took some looking to find the problem. Evidently, when I installed ImageMagick (which brought with it a ton of dependencies), it killed some file system entries that were required by SHH. Yay!
To fix, I had to run:
/sbin/MAKEDEV tty /sbin/MAKEDEV pty
Then, I could get back into SSH. Fortunately, lxadmin was working, and I finally found a use for its primitive and otherwise worthless “Command Center” tool, which lets you execute arbitrary shell commands.
I also wanted to add a few options to my system startup. Just some plain ol’ shell commands, nothing fancy. No services or anything of that sort. This is not as obvious a thing as you might suspect. I knew it had to go in one of the rc.d scripts, but I had no clue which one.
The answer: rc.local. Specifically, /etc/rc.d/rc.local. You can add whatever commands you want to execute there. Be sure to add an ampersand (&) to the end of any command that might take a while, so it’s run in the background.
So, I am learning. It’s a frustrating and often annoying process, but now I have everything working the way I want it to. It does expose one of my lingering gripes with Linux, though: nothing is obvious. Who would think installing a program would break something completely unrelated, like SSH? It doesn’t make any sense. SSH worked fine from day one, until I installed ImageMagick. For that matter, I don’t see why ImageMagick requires 38MB of dependencies, including most of Gnome and X11. I realize it’s just using them as libraries, but still, I do find it a tad aggravating to see space getting used up by chunks a windowing system I won’t even be using. Windows has “DLL hell,” and Linux has “dependency hell.” Six of one, half a dozen of the other, I guess.