Installation difference between from source and apt-get?

What's the difference between installation from source (./configure && make && make install) and with apt-get?

I can think of these:

  • apt-get version usually is more stable and less choice, while we can chose the specific version when install from source.
  • apt-get can resolve dependencies automatically, can update/uninstall software easily, and has some other easy management goodness.
  • apt-get installation path follows a consistent pattern, and have some other conventions, which is convenient for SA.

But are there more?

  • Can installation from source get better performance than via apt-get for some certain software, like php and mysql?
  • Some other differences?

In a word, in which condition should I chose installation from source than apt-get, except to get a specific version of that software?

Thanks.


The difference is that apt installs generic binaries and manages their versions.

When compiling a source package you are entirely on your own because apt cannot manage the package.

However, compiling a source package and installing it yourself is useful if you need features that can be had only by compiling the package yourself.

Sometimes developers will provide features that can only be used in software if a certain compiler switch is used. And sometimes specific processors can perform better if certain compile flags are used.

However, in most cases the features that can be enabled are for debugging purposes and will never be needed even by hard core users. And the binary version that apt is configured to use is already optimized for your processor.

Possible situations where you would need to compile the source yourself would be:

  • There's a version of the software available that has features or fixes you need but the package hasn't been updated in your repository yet.
  • You're compiling the software to use on a computer with a different architecture.