I am reading a book it says:

"Most distributions install just one package system. It’s possible to install
more than one, though, and some programs (such as alien) require both
for full functionality. Actually using both systems to install software is
inadvisable because their databases are separate. If you install a library
using a Debian package and then try to install an RPM package that relies
on that library, RPM won’t realize that the library is already installed and
will return an error."

When we compile and install a software from source code,debian package database does not know about the software and its files , and according to book this software should not recognize our shared libraries ,because they have been installed from package files.

Is it true ?if it is, can we say installation from source code use only static library?


No source installs do use the libraries of the system, regardless if the libraries are installed by package or source itself.

It is the package manager which does not know about libraries installed from source or by another package manager, so the package manager will think the dependencies are not there even if they are.

On Debian you can use checkinstall instead of make install to create rudimentary debian packages of your source installs.

You can also use equivs to create empty packages to provide dependencies for other packages.

  • Thanks sir. it means they use only static libraries? – Sinoosh Aug 8 '16 at 20:16
  • 1
    No, by default if you compile something it will use the libraries dynamically, the linking happens at runtime. ldd /path/to/program will show you the libraries a program will use dynamicly. Static linking, that means including the libraries into the executable happens at compile time. – Uwe Burger Aug 10 '16 at 11:58
  • That is done with the static flag to gcc. – Uwe Burger Aug 10 '16 at 11:59
  • because of my english, installation from source code use installed libraries if they need them, and if we use package manager for installation packages they should use only those libraries that installed from same package manager and package system – Sinoosh Aug 10 '16 at 13:15
  • 1
    Yes. If you compile a program it uses the libraries it needs, regardless if they were installed by package manager or compiled by hand themselves. – Uwe Burger Aug 10 '16 at 18:26

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.