cyradm undefined symbol: db_version

Jorey Bump list at joreybump.com
Sun Oct 8 12:51:53 EDT 2006


Andi Voss wrote:

>>
>> I'm using cyrus-sasl-2.1.22 and cyrus-imap-2.2.12 on two Slackware boxes.

What versions of Slackware?

>> On one system everything is fine, everything works like it should be, but
>> on the other system cyradm is not working at all. When I try to login
>> with: #cyradm --user cyrus --server localhost --auth login
>> this error appears:
>>
>> Can't load
>> '/usr/lib/perl5/site_perl/5.8.8/i486-linux/auto/Cyrus/IMAP/IMAP.so' for
>> module Cyrus::IMAP:
>> /usr/lib/perl5/site_perl/5.8.8/i486-linux/auto/Cyrus/IMAP/IMAP.so:
>> undefined symbol: db_version at
>> /usr/lib/perl5/5.8.8/i486-linux/DynaLoader.pm line 230.
>>  at /usr/lib/perl5/site_perl/5.8.8/i486-linux/Cyrus/IMAP/Admin.pm line 44
>> Compilation failed in require at
>> /usr/lib/perl5/site_perl/5.8.8/i486-linux/Cyrus/IMAP/Admin.pm line 44.
>> BEGIN failed--compilation aborted at
>> /usr/lib/perl5/site_perl/5.8.8/i486-linux/Cyrus/IMAP/Admin.pm line 44.
>> Compilation failed in require at
>> /usr/lib/perl5/site_perl/5.8.8/i486-linux/Cyrus/IMAP/Shell.pm line 60.
>> BEGIN failed--compilation aborted at
>> /usr/lib/perl5/site_perl/5.8.8/i486-linux/Cyrus/IMAP/Shell.pm line 60.
>> Compilation failed in require.
>> BEGIN failed--compilation aborted.
>>
>> login to imap is working:
>> telnet localhost imap
>> Trying 127.0.0.1...
>> Connected to localhost.
>> Escape character is '^]'.
>> * OK Fax Cyrus IMAP4 v2.2.12 server ready
>> . logout
>> * BYE LOGOUT received
>> . OK Completed
>> Connection closed by foreign host.

You only connected to the server, there is no login here. Do you have 
imtest on the box? Try:

  imtest -a cyrus -m LOGIN localhost

>> I know this error is "well known" and I spent much time to solve the
>> problem but I didn't. On my other box I solved this problem with
>> installing the BerkeleyDB-4.4.
>> As I understand the error, the "undefined symbol: db_version at
>> /usr/lib/perl5/5.8.8/i486-linux/DynaLoader.pm line 230." is the problem.
>> This problem, I've located, belongs to BerkeleyDB - Am I right?
>> Or is perl the problem? I've no more idea...

Sorry, I use Slackware 10.2 and use the stock db4, cyrus-sasl, perl, and 
  openssl without any problems.

>> #saslpasswd2 -c cyrus
>> Password:
>> Again (for verification):
>> ALL OK

Not related to your problem, but I find it useful to explicitly set the 
realm when creating users, to make the password database more portable, 
and prevent corruption if the local hostname is changed:

  saslpasswd2 -c cyrus -u mail.example.com

Then I add this to /etc/imapd.conf:

  defaultdomain: mail.example.com
  servername: mail.example.com

And this to the Postfix main.cf:

  smtpd_sasl_local_domain = mail.example.com

>> compiled cyrus-imapd:
>> #./configure --with-auth=unix --with-sasl=/usr/lib/sasl2
>> --with-openssl=/usr/local/ssl --with-dblib=berkeley
>> --with-bdb-libdir=/usr/local/BerkeleyDB.4.4/lib
>> --with-bdb-incdir=/usr/local/BerkeleyDB.4.4/include
>> #make && make install
>> ALL OK

On a stock Slackware 10.2, I use this:

  ./configure \
    --prefix=/usr \
    --with-bdb-libdir=/usr/lib \
    --with-bdb-incdir=/usr/include/db4 \
    --enable-idled
  make depend
  make all CFLAGS=-O
  su -c "make install"

I know it doesn't match your system, but maybe a different reference 
will prove useful. If nothing else, consider setting up a test box with 
a recent stock Slackware, and see if it might be easier to use that 
instead of a heavily customized system.

>> #perl -MCPAN -eshell
>> #>install IMAP::Admin
>> #>installed OK
>>
>> #cd /src/cyrus_imap/perl/imap
>> #su cyrus
>> #perl Makefile.PL
>> Checking if your kit is complete...
>> Looks good
>> Writing Makefile for Cyrus::IMAP
>> #make && make install
>> ALL OK

Hmmm, I never need to do this, but I'm using Cyrus IMAP 2.3.x, and am 
unfamiliar with 2.2.12. Are you able to move up to 2.3.x?

>> I upgraded and reinstalled perl (now 5.8.8 binary from slackware).

Are there still other versions of perl on the system? If your symlinks 
and paths aren't correct, you can get the sort of errors you're 
encountering. What happens when you run the following command?

  perl -v -MCyrus::IMAP::Shell -e ''

>> Perhaps this is the problem?
>> Is anybody able to help me solving this cyrus-imap/cyradm/berkeley
>> problem?

I'm obviously stabbing in the dark, here, but I'm also using Slackware 
without any problems. Installation is fairly simple, but configuration 
is rather involved. I'll be happy to share my notes with you offline. I 
haven't tried installation on the newly released Slackware 11.0, but 
assume there aren't many significant changes. You can definitely try 
that version if you want more cutting edge software.




More information about the Info-cyrus mailing list