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

I am trying to venture into the world of Open Source development and had a question:

Everytime I want to compile the latest version, I usually download the tar ball and compile it. However, then I end up with 2 versions of the same software. One through sudo apt and one through compiling. How do I handle this problem?

Should I delete the sudo apt'ed one and keep the development version or let them both stay?

Also, I know its a dumb question but how do I make sure that my codes are up-to-date? Do I have to download the nightly builds everyday (or checkout) and compile everyday?

share|improve this question
up vote 1 down vote accepted

How you handle different versions is up to you. It will depend on what kind of software it is.

Yes, if you choose to compile and software yourself, you'll have to manually keep it up to date. That means downloading and applying new source. If the program is written in a compiled language, you'll need to recompile that program after making changes to its source.

However, you should never have to choose between an apt-get version and a self-compiled one. You should package and install the software before you install it anyway. You'll certainly want to get and learn checkinstall. It's very easy to use. Instead of sudo make install, you'll do sudo checkinstall. It will then ask you to fill in a form about the package, then it'll install that package.

This can sound like it requires some effort. And it does. However, there are ways to radically improve this.

  1. Keep your own local branch of the code.
  2. Only download changes that's occurred since your alst pull from the upstream.
  3. Add deb packaging information to your branch if it doesn't already have it. That way, you can easily keep it up to date.
  4. Take a break to really let it sink in just exactly what a radical step a fork is. The bigger the changes between your branch and the upstreams trunk, the more work you'll have to manually perform.
  5. Write scripts to automate the above tasks.
  6. Keep a PPA to make it easier for yourself and others to install and use the compiled software.

Launchpad can perform the above tasks for you so you get your own daily repo with minimal effort. It's called a build recipe You'll still need to branch from the upstreams trunk, merge with your own, then push your new trunk to Launchpad. This is good, because you'll want to review the upstreams code changes in any case.

So, this requires more learning, but once it's setup correctly, you'll save yourself of loads of work every day. It really is worth spending some time to learn properly. Even if it should take weeks to really get comfortable with it, you should.

share|improve this answer

Your Answer


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