Ubuntu:找不到 ndbm.h

Pha*_*ate 4 compiling ubuntu header-file apache-httpd

我需要编译一个旧的Apache版本,1.3,编译过程失败,因为:

mod_auth_dbm.c:77:18: fatal error: ndbm.h: File or directory not found
Run Code Online (Sandbox Code Playgroud)

这个 ndbm.h 文件在哪里?

rus*_*ush 5

在 ubuntu 中有一个apt-file包可以让你找到包含指定文件的包。你需要安装它

sudo apt-get install apt-file
Run Code Online (Sandbox Code Playgroud)

更新缓存

apt-file update
Run Code Online (Sandbox Code Playgroud)

然后你可以搜索你需要的包

apt-file search ndbm.h
Run Code Online (Sandbox Code Playgroud)

只有tendra包,其中包含具有此类名称的文件。

libgdbm-dev 还包含 /usr/include/gdbm-ndbm.h。可能正是你需要的。你可以尝试用它编译。

附:您也可以在 ubuntu 网站上使用搜索