Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As an example I've installed libcurl v7.30 from source, using their tutorial:

./configure --disable-ipv6 --enable-ares
 make install

I've had libcurl installed from the official repository prior to this.

Would the install be overwritten by automatic updates? If yes what is the proper way to install from source and not mess with official installations.

If the package is already installed should it be removed before a new install?

I guess an alternative would be to install in a diferent folder, but how wouldn this change usage? (in my case compiling) and would it cause problems with references?

share|improve this question
up vote 4 down vote accepted

For the most part, software installed from the repository can and sometimes will overwrite source-built software. If you want to stop this from happening (i.e. have another source built version lingering on your system, and easy to remove), then continue reading. It is always advisable to set up the source build so that it installs to a different directory. If you want to get the Ubuntu version of the software back, you run

sudo apt-get install --reinstall libcurl3

First of all, you should read the README or INSTALL file of the source code to understand the parameters. That way, you absolutely know the parameter to parse and to which command you should send it to. But below is a generic way that works on most source builds in my (admittedly) limited experience

Compiling from source

Since the best practice is to use checkinstall, we will install this first:

sudo apt-get install checkinstall

This will make your life easier when removing compiled packages, as noted by apmouse.

Quite often a parameter for ./configure is --prefix <directory> and is used like this:

auto-apt run ./configure --prefix=/opt/libcurl

and then you do the rest of the source build dance:

sudo checkinstall

and the make command will create the directory and install your files for you.

Removing the built package

If you ever need to remove your source files, you can just run:

sudo dpkg -r libcurl

If you need the files to be accessible from the terminal, then look at this AskUbuntu question for some ideas on how to add your new path to the $PATH variable.

share|improve this answer
Using "make install" is not best practice: it will be hard to remove soft in future. Ubuntu (and Debian) wiki recommend to use checkinstall instead. – sorgel Apr 30 '13 at 11:59
Thanks for that @apmouse, I had no idea that even existed. – somoso Apr 30 '13 at 12:04
seems that prefix is usable in curl, as noted in the install instructions, thanks. – clickstefan Apr 30 '13 at 13:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.