Home Forums OS X Server and Client Discussion Mail amavisd startup error

  • This topic has 5 replies, 2 voices, and was last updated 20 years ago by Anonymous.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #358509
    XL
    Participant

    I’ve been going through the “Spam and Virus Controls with Postfix” article.
    When I get to the step when I am supposed to start amavisd debug, I get the following error message:

    Can’t locate BerkeleyDB.pm in @INC (@INC contains: /System/Library/Perl//darwin-2level /System/Library/Perl/ /Library/Perl//darwin-2level /Library/Perl/ /Library/Perl/ /Network/Library/Perl//darwin-2level /Network/Library/Perl/ /Network/Library/Perl/) at /usr/bin/amavisd line 5025.
    BEGIN failed–compilation aborted at /usr/bin/amavisd line 5025.

    BerkeleyDB.pm is in my CPAN directory and even when I moved it to /Library/Perl it did not work (not sure if I was supposed to even do that)

    Please help.

    #358515
    XL
    Participant

    I downloaded Berkeley DB v4.2.52 when I noticed that it does not come with db.h. Where can I find this file? And when I do find it, exactly where am I supposed to put it on my system for cpan to install BerkeleyDB?

    Thanks for the help.

    #358529
    XL
    Participant

    I downloaded Berkeley DB v 4.2.52 and ran ranlib on libdb.a .
    However when I try to cpan BerkeleyDB now, the make test fails.
    This is what I get”:

    Parsing config.in…
    Looks Good.
    Checking if your kit is complete…
    Looks good
    Note (probably harmless): No library found for -ldb
    Writing Makefile for BerkeleyDB
    cp BerkeleyDB/Hash.pm blib/lib/BerkeleyDB/Hash.pm
    cp BerkeleyDB.pm blib/lib/BerkeleyDB.pm
    AutoSplitting blib/lib/BerkeleyDB.pm (blib/lib/auto/BerkeleyDB)
    cp BerkeleyDB/Btree.pm blib/lib/BerkeleyDB/Btree.pm
    cp BerkeleyDB.pod blib/lib/BerkeleyDB.pod
    /usr/bin/perl /System/Library/Perl/ExtUtils/xsubpp -noprototypes -typemap /System/Library/Perl/ExtUtils/typemap -typemap typemap BerkeleyDB.xs > BerkeleyDB.xsc && mv BerkeleyDB.xsc BerkeleyDB.c
    cc -c -I./libraries/4.2.41/include -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Os -DVERSION=\”0.25\” -DXS_VERSION=\”0.25\” “-I/System/Library/Perl/darwin-2level/CORE” BerkeleyDB.c
    Running Mkbootstrap for BerkeleyDB ()
    chmod 644 BerkeleyDB.bs
    rm -f blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle
    LD_RUN_PATH=”” MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup BerkeleyDB.o -o blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle
    ld: warning -prebind has no effect with -bundle
    chmod 755 blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle
    cp BerkeleyDB.bs blib/arch/auto/BerkeleyDB/BerkeleyDB.bs
    chmod 644 blib/arch/auto/BerkeleyDB/BerkeleyDB.bs
    Manifying blib/man3/BerkeleyDB.3
    /usr/bin/make — OK
    Running make test
    PERL_DL_NONLAZY=1 /usr/bin/perl “-MExtUtils::Command::MM” “-e” “test_harness(0, ‘blib/lib’, ‘blib/arch’)” t/*.t
    t/btree……..dyld: /usr/bin/perl Undefined symbols:
    /private/var/root/.cpan/build/BerkeleyDB-0.25/blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle undefined reference to _db_create expected to be defined in a dynamic image
    /private/var/root/.cpan/build/BerkeleyDB-0.25/blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle undefined reference to _db_env_create expected to be defined in a dynamic image
    /private/var/root/.cpan/build/BerkeleyDB-0.25/blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle undefined reference to _db_strerror expected to be defined in a dynamic image
    /private/var/root/.cpan/build/BerkeleyDB-0.25/blib/arch/auto/BerkeleyDB/BerkeleyDB.bundle undefined reference to _db_version expected to be defined in a dynamic image
    t/btree……..dubious
    Test returned status 0 (wstat 5, 0x5)

    Then just for a test I tried starting amavisd and got:

    dyld: perl Undefined symbols:
    /Library/Perl//darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle undefined reference to _db_create expected to be defined in a dynamic image
    /Library/Perl//darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle undefined reference to _db_env_create expected to be defined in a dynamic image
    /Library/Perl//darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle undefined reference to _db_strerror expected to be defined in a dynamic image
    /Library/Perl//darwin-2level/auto/BerkeleyDB/BerkeleyDB.bundle undefined reference to _db_version expected to be defined in a dynamic image
    Trace/BPT trap

    I have no idea what I am doing wrong here. Please help.

    Thanks.

    #358872
    Anonymous
    Guest

    if you are not succeeded yet here is solution:
    download the latest version of BerkeleyDB:

    curl -O http://www.sleepycat.com/update/4.0.14/db-4.0.14.tar.gz
    
    

    Uncompress it and change to the package directory with:

    gnutar -zxf http://www.sleepycat.com/update/4.0.14/db-4.0.14.tar.gz
    cd db-4.0.14
    
    

    Compile and install the software with the following commands:

    cd build_unix
    ../dist/configure
    make
    sudo make install
    
    

    Change into the DB_File directory of db-4.0.14/perl directory. Assume superuser rights (or prefix commands below with ‘sudo’).
    We need to make a few changes to the config.in file; specifically:
    Find the INCLUDE lines, and comment all of them out by prefixing the line with the octothorpe (“#”).
    Add the line

    INCLUDE=/usr/local/BerkeleyDB.4.0/include
    

    and

    LIB=/usr/local/BerkeleyDB.4.0/lib
    

    Than

    perl Makefile.PL
    
    make
    make test
    make install
    
    

    Than

    cd ../BerkeleyDB
    
    

    do the same with BerkeleyDB perl module sources.

    Don’t forget to run

    ranlib sudo runlib /usr/local/BerkeleyDB.4.0/lib/libdb.a
    
    

    Now try under clamav

    amavisd debug
    
    #361073
    Anonymous
    Guest

    I have got the same problem. I’m working with fedora core 2, so i used yum and cpan to install the missing perl module:

    yum -y install db4-devel
    
    

    cpan BerkeleyDB
    
    
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed