无法安装opendkim因为找不到bsd/string.h

Cha*_*les 4 linux email install dkim

我尝试在AWS 上安装OpenDKIM 2.9.2以生成DKIM公钥和私钥.当我sudo ./configure --with-openssl=/usr/include/openssl在opendkim源代码文件夹下运行时,它给了我以下错误消息.

checking bsd/string.h usability... no
checking bsd/string.h presence... no
checking for bsd/string.h... no
checking for strlcat... no
checking for library containing strlcat... no
checking for library containing strlcpy... no
checking for strlcpy... no
checking for library containing strlcat... (cached) no
checking for library containing strlcpy... (cached) no
configure: error: no strlcpy/strlcat found
Run Code Online (Sandbox Code Playgroud)

我搜索了系统,发现string.h文件位于以下文件夹中

/usr/include/bits/string.h
/usr/include/string.h
/usr/include/linux/string.h
Run Code Online (Sandbox Code Playgroud)

我创建了一个名为bsdunder /usr/include(/usr/include/bsd)的文件夹,并创建了一个软链接/usr/include/string.h.然后安装过程可以找到该string.h文件,但它仍然找不到该文件中的strlcatstrlcpy函数.所以我想我需要安装libbsd.然后我跑了" whereis libbsd"然后我得到了" /usr/lib64/libbsd.a".所以我想已经安装了lib.

所以现在我不知道如何解决问题并从源代码安装OpenDKIM.

请帮帮我.提前致谢.

Rah*_*obi 16

你需要安装libbsd-dev

如果你使用的是ubuntu

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

如果你使用centOS

sudo yum install  libbsd-devel
Run Code Online (Sandbox Code Playgroud)

希望这对你有所帮助