6

I tried to install OpenDKIM 2.9.2 on AWS to generate the DKIM public & private keys. And when I run sudo ./configure --with-openssl=/usr/include/openssl under the opendkim source code folder, it gave me the following error messages.

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

I searched the system and I found the string.h files locate at the following folders

/usr/include/bits/string.h
/usr/include/string.h
/usr/include/linux/string.h

And I created a folder called bsd under /usr/include (/usr/include/bsd), and created a soft link to the /usr/include/string.h. Then the install process can find the string.h file, but it still cannot find the strlcat and strlcpy functions in that file. So I guess that I need to installed libbsd. Then I ran "whereis libbsd" and I got "/usr/lib64/libbsd.a". So I guess that the lib has been installed.

So now I have no idea about how to fix the issue and install OpenDKIM from source.

Please help me on this. Thanks in advance.

3 Answers 3

19

You need to install libbsd-dev

if you are using ubuntu

sudo apt-get install  libbsd-dev

if you are using centOS

sudo yum install  libbsd-devel

Hope this helps you

6
  • Maybe AWS EC2 server is not using the redhat yum repo list. When I ran yum info libbsd-dev, YUM cannot find a match. Is there a way that I can manually install that lib?
    – Charles
    Jun 30, 2014 at 7:55
  • I found source code for libbsd-dev and I installed it. Then I install the opendkim again, and now the install process can find the string.h file, but it still cannot find the functions. I guess that the .h file only defines the function name and because AWS EC2 use redhat OS and it is not a bsd OS, there are no implementations of those functions. Am i right? And if I cannot fix this, is there a opendkim package for redhat? (Linux version 3.10.35-43.137.amzn1.x86_64 (mockbuild@gobi-build-31002) (gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) ) #1 SMP Wed Apr 2 09:36:59 UTC 2014)
    – Charles
    Jun 30, 2014 at 8:12
  • it seems like compiler don't able to find libbsd please reinstall it Jun 30, 2014 at 8:20
  • Thank you so much for the reply. And I checked the content of the string.h file from libbsd-dev, and it didn't contain function body. I will try to create a local repo and let yum to search the dependancies. Maybe I don't have the dependancies installed.
    – Charles
    Jun 30, 2014 at 10:07
  • 1
    I have figured out how to do it. Because I just need to generate the key, I didn't check other stuff but "opendkim-genkey" command. First, I installed "libbsd-0.6.0-3.fc21.x86_64.rpm" and "libbsd-devel-0.6.0-3.fc21.x86_64.rpm" on AWS EC2, and then installed "sendmail-devel". At last, get "opendkim-2.9.2.tar.gz" and install it like other linux package. Then the "opendkim-genkey" command has been installed and it is working.
    – Charles
    Jul 1, 2014 at 10:10
2

I realize an answer has already been selected. But this worked for me on a new CentOS 6.x installation on DigitalOcean.

  1. Install RHEL EPEL Repos

    wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm

  2. Yum for libbsd-devel

    yum install libbsd-devel

Reference: Installing RHEL EPEL Repo on Centos 5.x or 6.x, pkgs.org

0

Also a note even though this has been closed - Amazon EC2 Linux also needs the EPEL repos...

yum-config-manager --enable epel > /dev/null
yum update
yum install libbsd-devel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.