Home » Questions » Computers [ Ask a new question ]

Linux, recompiling from source

Linux, recompiling from source

I'm relatively new to Linux but I've been messing around with a Ubuntu VM to get more acclimated with it. I set up SSH, Apache, PHP, MySQL, Ruby, Rails, Passenger, and Git to mess around with my web development projects. A few of those I built from source, PHP and Git off the top of my head.

Asked by: Guest | Views: 32
Total answers/comments: 2
Guest [Entry]

"Compiling your software in a VM is a great way to ""get acclimated"" with an operating system. No doubt all the dire warnings about rolling your own are true, for a production machine, but you'll be better off in the long run if you make your mistakes now.

If there is any reason to uninstall a previous version, it should be noted in a README or INSTALL file. If not, it should be safe just to run 'make install', which will overwrite the old version. Make a snapshot of your VM right before ""make install"". When, not if, something breaks, try to fix it. If you can't fix it, revert to the snapshot and try again.

If later on, you want to completely undo what you have done, the Makefile has all the information you need to uninstall. You can write your own ""uninstall"" target, or do it manually with just ""rm"". Bear in mind other things may have become dependent on the software in the meanwhile, so the snapshot strategy makes sense for uninstalling too.

For all the goodness of package managers, they have some faults. Some packages have huge dependancies to add features you are not interested in. Sometimes they don't have the version of the software you want. Sometimes they don't have the software at all.

If you run into one of these problems on an important machine, and you are entirely dependent on package managers your mistakes will be costly. But now, you can just revert to the last-known-good and move on, a little wiser."
Guest [Entry]

"There is no generic way of uninstalling source-compiled things; that's one of the many reason not to install anything from source. make uninstall will work sometimes, through.

You can do some changes to a package without installing 'raw' sources: take a look at this and this Debian-Administrationdotorg articles."