7

For installing software from source:

./configure
make
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.)

1 Answer 1

8

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.

5
  • 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. Dec 5, 2011 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. Dec 5, 2011 at 8:38
  • 1
    @HaroldChan: I belatedly remembered another option and have edited my answer accordingly. Dec 5, 2011 at 10:01
  • wow~great~ I will try it later Dec 5, 2011 at 10:51
  • It works for me! I used nodejs as the testing app. It works!! Dec 5, 2011 at 17:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .