I want to write a program based on GBDM on ubuntu. I Installed ubuntu, gcc and make.
After installing (Os, gcc, make), I search for any files related to gdbm (*.a, *.so, *.h), and I saw only the following files:
/usr/share/doc/libgdbm-compat4
/usr/share/doc/libgdbm6
/usr/lib/x86_64-linux-gnu/libgdbm_compat.so.4
/usr/lib/x86_64-linux-gnu/libgdbm.so.6
/usr/lib/x86_64-linux-gnu/libgdbm_compat.so.4.0.0
/usr/lib/x86_64-linux-gnu/libgdbm.so.6.0.0
I manually, created soft link for
/usr/lib/x86_64-linux-gnu/libgdbm.so
as
ln -s /usr/lib/x86_64-linux-gnu/libgdbm.so.6 /usr/lib/x86_64-linux-gnu/libgdbm.so
But I could not find any gdbm.h(or related .h), so I downloaded sample gdbm.h (however I could get it from installing gdbm-dev or etc).
My questions is:
1- Is it normal that there exists library file (libgdbm.so.6) but there doesn't exists related header file?
2- What is the best (or popular) way for solving this problem!
Most Linux distributions (including Debian and Ubuntu) have separate packages for the compiled software and its development headers (as those headers are often not needed). For Debian/Ubuntu there is a convention to name the package containing the development files with a
-devsuffix.In your case, your required files (including
libgdbm.soandgdbm.h) are contained in the libgdbm-dev package. You can install it withYou can find packages containing a certain file with a search on https://packages.ubuntu.com/#search_contents