I’m new to compiling and installing programs on linux. I understand the common process is to do
./configure
make
make install
I’d like to know if there is some way I can “rollback” if I make a mistake somewhere or if something goes wrong.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Agree with other answers, and I wanted to clarify a bit. If my understanding is correct, typically
./configureis a script that makes sure / sets up your system so that compilation will go correctly. Thenmakeruns a Makefile that actually compiles. Thenmake installruns the makefile withinstallas a parameter that actually copies your binaries and config files to the appropriate (as determined by the script author) system directories, which is why oftenmake installmust be run with elevated privileges.Often the make script takes an
uninstallparameter that actually erases everything that was copied to system directories. In my experience, this isn’t always going to be a clean process. There’s no fireproof way to roll back without ensuring yourself that all changes are tracked perfectly and writing the rollback script yourself.In short, try
make uninstalland if that doesn’t work and you can’t figure it out yourself, try posting on a mailing list or forum pertaining to the particular product in question.Edit for more info:
just running
makeshould get you everything you need to run a program, as long as you keep your working directory as wherever you ranmakefrom. That is,makewill create all your binaries and config files, etc, and you can use the software fine from that directory. You won’t have any globally accessible binaries or proper environment variables, though, if you don’t copy things to system directories, such as withmake install. So if you’re just trying to run a self-contained binary that isn’t software that something else will rely on, you don’t actually need to runmake installand won’t have to worry about rolling back. Everything will be contained within your original working directory.