For installing software from source:

sudo make install

How to tell the apt-get that the software has been installed, so that

sudo apt-get install someSoftware

Will show that the software has been installed?

(the software is in the ubuntu package repository, but with older versaion.)


You can't. And in most cases, you shouldn't install a bare source tarball unless there's absolutely no other way. Use a package from Ubuntu, or build a source package from Debian, or anything else. You really want to use Debianized source.

However, you can build/modify a source package:

apt-get source some-package

Then, after making any changes, build a binary package:

cd source-directory
debuild -S

Now, you have a .deb package you can install.

EDIT: I belatedly remembered checkinstall. You can use checkinstall to replace the make install step. You'll get something that looks very much like your original question asked for, although the last time I worked with checkinstall (years ago) it was far from perfect. The other options I mentioned are better than this one.

  • Thanks for your reply. Unfortunately, the code in the repository is also old. I have tried to use pinning method for newer package, its dependency crashes my hold system. Building from bare source should not produce such disaster according to the software docs. The dependency for compiling the raw source code is not that strict. – Harold Chan Dec 5 '11 at 8:31
  • 1
    @HaroldChan: Of course, you're free to compile the raw source. But you can't hook it into package management. Have you checked Debian? There's a good chance that Debian has a more recent version. Or, if it's been packaged in another format (RPM, etc.), you might be able to use alien to convert it to .deb. But having un-managed software in your system can quickly become a nightmare if you aren't careful. I know, because I've experienced it. – Scott Severance Dec 5 '11 at 8:38
  • 1
    @HaroldChan: I belatedly remembered another option and have edited my answer accordingly. – Scott Severance Dec 5 '11 at 10:01
  • wow~great~ I will try it later – Harold Chan Dec 5 '11 at 10:51
  • It works for me! I used nodejs as the testing app. It works!! – Harold Chan Dec 5 '11 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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