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.