Search code examples
linuxberkeley-db

Berkeley DB: "make install" fails on Linux


I am trying to install Berkeley DB 18.1.40 (C++ version) on my virtual machine (Linux-Ubuntu).

When I do sudo make install, I encounter the following error messages:

Installing DB include files: /usr/local/BerkeleyDB.18.1/include ...
Installing DB library: /usr/local/BerkeleyDB.18.1/lib ...
libtool: install: cp -p .libs/libdb-18.1.so /usr/local/BerkeleyDB.18.1/lib/libdb-18.1.so
libtool: install: cp -p .libs/libdb-18.1.lai /usr/local/BerkeleyDB.18.1/lib/libdb-18.1.la
libtool: install: cp -p .libs/libdb-18.1.a /usr/local/BerkeleyDB.18.1/lib/libdb-18.1.a
libtool: install: chmod 644 /usr/local/BerkeleyDB.18.1/lib/libdb-18.1.a
libtool: install: ranlib /usr/local/BerkeleyDB.18.1/lib/libdb-18.1.a
libtool: install: cp -p libdb.a /usr/local/BerkeleyDB.18.1/lib/libdb.a
libtool: install: chmod 644 /usr/local/BerkeleyDB.18.1/lib/libdb.a
libtool: install: ranlib /usr/local/BerkeleyDB.18.1/lib/libdb.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /usr/local/BerkeleyDB.18.1/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/BerkeleyDB.18.1/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Installing DB utilities: /usr/local/BerkeleyDB.18.1/bin ...
libtool: install: cp -p .libs/db_archive /usr/local/BerkeleyDB.18.1/bin/db_archive
libtool: install: cp -p .libs/db_checkpoint /usr/local/BerkeleyDB.18.1/bin/db_checkpoint
libtool: install: cp -p .libs/db_convert /usr/local/BerkeleyDB.18.1/bin/db_convert
libtool: install: cp -p .libs/db_deadlock /usr/local/BerkeleyDB.18.1/bin/db_deadlock
libtool: install: cp -p .libs/db_dump /usr/local/BerkeleyDB.18.1/bin/db_dump
libtool: install: cp -p .libs/db_hotbackup /usr/local/BerkeleyDB.18.1/bin/db_hotbackup
libtool: install: cp -p .libs/db_load /usr/local/BerkeleyDB.18.1/bin/db_load
libtool: install: cp -p .libs/db_log_verify /usr/local/BerkeleyDB.18.1/bin/db_log_verify
libtool: install: cp -p .libs/db_printlog /usr/local/BerkeleyDB.18.1/bin/db_printlog
libtool: install: cp -p .libs/db_recover /usr/local/BerkeleyDB.18.1/bin/db_recover
libtool: install: cp -p .libs/db_replicate /usr/local/BerkeleyDB.18.1/bin/db_replicate
libtool: install: cp -p .libs/db_stat /usr/local/BerkeleyDB.18.1/bin/db_stat
libtool: install: cp -p .libs/db_tuner /usr/local/BerkeleyDB.18.1/bin/db_tuner
libtool: install: cp -p .libs/db_upgrade /usr/local/BerkeleyDB.18.1/bin/db_upgrade
libtool: install: cp -p .libs/db_verify /usr/local/BerkeleyDB.18.1/bin/db_verify
Installing documentation: /usr/local/BerkeleyDB.18.1/docs ...
cp: cannot stat 'bdb-sql': No such file or directory
cp: cannot stat 'gsg_db_server': No such file or directory
Makefile:1307: recipe for target 'install_docs' failed
make: *** [install_docs] Error 1

I am quite confused of why it is prompting this error, as bdb-sql and gsg_db_server is not something that is mentioned in the installation manual.

Does anyone know how these errors can be fixed?

Thanks for help!


Solution

  • As @fuzzyTew said, this appears to be a bug with 18.1.40, but as it's limited to the documentation it should be safe enough to patch yourself. There's two simple ways to do this. By far the easier is to just create the directories it wants in the docs directory, easily accomplished with mkdir db-18.1.40/docs/bdb-sql db-18.1.40/docs/gsg_db_server. This will leave you with a random pair of empty directories in your documentation folder, but I can't find any references even within the documentation itself that uses them so it should be safe enough. Alternatively, you can remove them from the Makefile after running configure using sed -i.bak -e 's: bdb-sql : :' -e 's: gsg_db_server : :' Makefile. Personally, I prefer just making the empty directories as it's nearly impossible for that to go wrong.