I tried to include in my Apache Web server's configuration the mod_rewrite module, but when I restarted the server, I received an error:

Cannot load /usr/local/apache/libexec/mod_rewrite.so into server:
/usr/local/apache/libexec/mod_rewrite.so: undefined symbol: dbm_fetch

The problem, as it turns out, is that mod_rewrite.so is compiled incorrectly. It should be linked with a dbm library but it isn't.

If you have an up-to-date set of Apache source files, you can easily solve this problem by manually rerunning the last compilation step of this module, using the correct options. When you execute make mod_rewrite.so in the appropriate directory, it performs this final step:

gcc -shared -o mod_rewrite.so mod_rewrite.lo

Rerun gcc, this time adding a reference to the GNU gdbm library:

gcc -shared -o mod_rewrite.so mod_rewrite.lo -lgdbm

Next, copy the newly created mod_rewrite.so over to /usr/local/apache/libexec or wherever your Apache module files are located.

In my case, this was all that was needed to solve the problem. Your mileage may vary.