amavisd-new not starting

Discussion in 'Installation/Configuration' started by ebreaka, Apr 16, 2011.

  1. ebreaka

    ebreaka New Member

    Hi,

    I have followed the perfect server Centos x86_64 tutorial... but I'm having one little problem with amavisd, hopefully someone here could help me to troubleshoot this problem... the error when starting amavisd is:

    [root@mage]# /etc/init.d/amavisd start
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    Starting Mail Virus Scanner (amavisd): shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    fetch_modules: error loading required module MIME/Head.pm:
    File::Temp version 0.18 required--this is only version 0.16 at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Tools.pm line 14.
    BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Tools.pm line 14.
    Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Head.pm line 125.
    BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Head.pm line 125.
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Body.pm line 450, near "whine "couldn't unlink ""
    (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Body.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Body.pm line 450, near "whine "couldn't unlink ""
    BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Body.pm line 485.
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder.pm line 205, near "usage "unsupported encoding '$enc': using 'binary'""
    (Do you need to predeclare usage?)
    fetch_modules: error loading required module MIME/Entity.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder.pm line 205, near "usage "unsupported encoding '$enc': using 'binary'""
    Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Entity.pm line 236.
    BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Entity.pm line 236.
    Compilation failed in require at /usr/sbin/amavisd line 197.
    fetch_modules: error loading required module MIME/Parser.pm:
    Global symbol "$M_DEBUG" requires explicit package name at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser/Filer.pm line 291.
    Global symbol "$M_WARNING" requires explicit package name at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser/Filer.pm line 302.
    BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser/Filer.pm line 765.
    Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser.pm line 146.
    BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser.pm line 146.
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Base64.pm line 80, near "debug "in = $in; out = $out""
    (Do you need to predeclare debug?)
    fetch_modules: error loading required module MIME/Decoder/Base64.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Base64.pm line 80, near "debug "in = $in; out = $out""
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 142, near "whine "saw 8-bit data while encoding 7bit""
    (Do you need to predeclare whine?)
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 147, near "whine "saw long line while encoding 7bit/8bit""
    (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Decoder/NBit.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 142, near "whine "saw 8-bit data while encoding 7bit""
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 147, near "whine "saw long line while encoding 7bit/8bit""
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/UU.pm line 93, near "whine "file incomplete, no end found\n""
    (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Decoder/UU.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/UU.pm line 93, near "whine "file incomplete, no end found\n""
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Gzip64.pm line 97, near "whine "Encoding ""
    (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Decoder/Gzip64.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Gzip64.pm line 97, near "whine "Encoding ""
    Compilation failed in require at /usr/sbin/amavisd line 197.
    ERROR: MISSING REQUIRED BASIC MODULES:
    MIME::Head
    MIME::Body
    MIME::Entity
    MIME::parser
    MIME::Decoder::Base64
    MIME::Decoder::NBit
    MIME::Decoder::UU
    MIME::Decoder::Gzip64
    BEGIN failed--compilation aborted at /usr/sbin/amavisd line 237.
    [FAILED]
     
  2. falko

    falko Super Moderator ISPConfig Developer

    What's the URL of the tutorial?

    You are trying to start amavisd from a directory that has been deleted in the meantime.
     
  3. ebreaka

    ebreaka New Member

    ok thanks, but this is actually also happening at the boot time...

    the tutorial is this one,
    http://www.how2forge.org/perfect-server-centos-5.6-x86_64-ispconfig-3
    but i had problems with that part at the page 4
    yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql

    it was not working to install with yum amavisd-new, clamav, clamd, bzip2 and unrar... I had to manually download a tons of rpm dependancies files for amavisd and after installing all of them one by one... Im still left with the problem im having when amavisd is starting...

    All the rest of this tutorial went perfectly fine, a big thanks to the author... and to anyone helping here :)

    OoO when manually installing dependancies, I have accidently installed Perl 5.8.8 for i386 by accidents resulting in having 2 versions of Perl... 386 and x86_64, if this can help out... I have removed the 386 version
     
    Last edited: Apr 17, 2011
  4. ebreaka

    ebreaka New Member

    I have removed amavisd and re-installed the RPM and i dont get anymore the error quoted... this is what i get now:

    [root@mage ~]# /etc/init.d/amavisd start
    Starting Mail Virus Scanner (amavisd): fetch_modules: error loading required module MIME/Head.pm:
    File::Temp version 0.18 required--this is only version 0.16 at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Tools.pm line 14.
    BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Tools.pm line 14.
    Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Head.pm line 125.
    BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Head.pm line 125.
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Body.pm line 450, near "whine "couldn't unlink ""
    (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Body.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Body.pm line 450, near "whine "couldn't unlink ""
    BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Body.pm line 485.
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder.pm line 205, near "usage "unsupported encoding '$enc': using 'binary'""
    (Do you need to predeclare usage?)
    fetch_modules: error loading required module MIME/Entity.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder.pm line 205, near "usage "unsupported encoding '$enc': using 'binary'""
    Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Entity.pm line 236.
    BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Entity.pm line 236.
    Compilation failed in require at /usr/sbin/amavisd line 197.
    fetch_modules: error loading required module MIME/Parser.pm:
    Global symbol "$M_DEBUG" requires explicit package name at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser/Filer.pm line 291.
    Global symbol "$M_WARNING" requires explicit package name at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser/Filer.pm line 302.
    BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser/Filer.pm line 765.
    Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser.pm line 146.
    BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser.pm line 146.
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Base64.pm line 80, near "debug "in = $in; out = $out""
    (Do you need to predeclare debug?)
    fetch_modules: error loading required module MIME/Decoder/Base64.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Base64.pm line 80, near "debug "in = $in; out = $out""
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 142, near "whine "saw 8-bit data while encoding 7bit""
    (Do you need to predeclare whine?)
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 147, near "whine "saw long line while encoding 7bit/8bit""
    (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Decoder/NBit.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 142, near "whine "saw 8-bit data while encoding 7bit""
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 147, near "whine "saw long line while encoding 7bit/8bit""
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/UU.pm line 93, near "whine "file incomplete, no end found\n""
    (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Decoder/UU.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/UU.pm line 93, near "whine "file incomplete, no end found\n""
    Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Gzip64.pm line 97, near "whine "Encoding ""
    (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Decoder/Gzip64.pm:
    syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Gzip64.pm line 97, near "whine "Encoding ""
    Compilation failed in require at /usr/sbin/amavisd line 197.
    ERROR: MISSING REQUIRED BASIC MODULES:
    MIME::Head
    MIME::Body
    MIME::Entity
    MIME::parser
    MIME::Decoder::Base64
    MIME::Decoder::NBit
    MIME::Decoder::UU
    MIME::Decoder::Gzip64
    BEGIN failed--compilation aborted at /usr/sbin/amavisd line 237.
    [FAILED]
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Did you enable all the third-party repositories, as shown in the tutorial (RPMForge, atrpms, centos.karan.org)?
     
  6. ebreaka

    ebreaka New Member

    Yes I did and could not find any packages to download and install with yum that way so the only alternative I had in mind was installing one by one the missing rpms :(

    I don't remember anything about RPMforge and centos.karan.org ???
     
    Last edited: Apr 17, 2011
  7. falko

    falko Super Moderator ISPConfig Developer

    See chapter 9 and 15.
     
  8. ebreaka

    ebreaka New Member

    ooO yes, those parts went perfectly fine...

    The ONLY problem I got was for the line I stated:
    yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql because the yum installer could not find any packages for amavisd, clamav, clamd, bzips2, unrar and perl-DBD-mysql... :confused:
     
  9. falko

    falko Super Moderator ISPConfig Developer

    If all those repositories are enabled, yum should be able to find these packages. Please double-check.
     
  10. ebreaka

    ebreaka New Member

    ok, I will do a clean install again... The only difference is I have installed X server to get the graphical interface.

    And about that part at chapter 15 :
    This is coming AFTER the part where I need to install:
    yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql

    So maybe I should do that (chapter 15) and then coming back to chapter 14 ?
     
  11. falko

    falko Super Moderator ISPConfig Developer

    No, don't change the order.
     
  12. ebreaka

    ebreaka New Member

    If I dont change the order, then I will be left with the same exact problem... Just wish I could simply resolve this amavisd problem...

    thanks for your help, any other idea is welcome
     
  13. vikas027

    vikas027 New Member

    I am also facing the same problem following this How-To

    I am using CentOS 5.5 32 Bit.

    Code:
    [root@box1 postfix]# /etc/init.d/amavisd start
    Starting Mail Virus Scanner (amavisd): fetch_modules: error loading required module MIME/Head.pm:
      File::Temp version 0.18 required--this is only version 0.16 at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Tools.pm line 14.
      BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Tools.pm line 14.
      Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Head.pm line 125.
      BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Head.pm line 125.
      Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Body.pm line 450, near "whine "couldn't unlink ""
            (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Body.pm:
      syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Body.pm line 450, near "whine "couldn't unlink ""
      BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Body.pm line 485.
      Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder.pm line 205, near "usage "unsupported encoding '$enc': using 'binary'""
            (Do you need to predeclare usage?)
    fetch_modules: error loading required module MIME/Entity.pm:
      syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder.pm line 205, near "usage "unsupported encoding '$enc': using 'binary'""
      Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Entity.pm line 236.
      BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Entity.pm line 236.
      Compilation failed in require at /usr/sbin/amavisd line 197.
    fetch_modules: error loading required module MIME/Parser.pm:
      Global symbol "$M_DEBUG" requires explicit package name at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser/Filer.pm line 291.
      Global symbol "$M_WARNING" requires explicit package name at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser/Filer.pm line 302.
      BEGIN not safe after errors--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser/Filer.pm line 765.
      Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser.pm line 146.
      BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Parser.pm line 146.
      Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Base64.pm line 80, near "debug "in = $in; out = $out""
            (Do you need to predeclare debug?)
    fetch_modules: error loading required module MIME/Decoder/Base64.pm:
      syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Base64.pm line 80, near "debug "in = $in; out = $out""
      Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 142, near "whine "saw 8-bit data while encoding 7bit""
            (Do you need to predeclare whine?)
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 147, near "whine "saw long line while encoding 7bit/8bit""
            (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Decoder/NBit.pm:
      syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 142, near "whine "saw 8-bit data while encoding 7bit""
      syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/NBit.pm line 147, near "whine "saw long line while encoding 7bit/8bit""
      Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/UU.pm line 93, near "whine "file incomplete, no end found\n""
            (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Decoder/UU.pm:
      syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/UU.pm line 93, near "whine "file incomplete, no end found\n""
      Compilation failed in require at /usr/sbin/amavisd line 197.
    String found where operator expected at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Gzip64.pm line 97, near "whine "Encoding ""
            (Do you need to predeclare whine?)
    fetch_modules: error loading required module MIME/Decoder/Gzip64.pm:
      syntax error at /usr/lib/perl5/vendor_perl/5.8.8/MIME/Decoder/Gzip64.pm line 97, near "whine "Encoding ""
      Compilation failed in require at /usr/sbin/amavisd line 197.
    ERROR: MISSING REQUIRED BASIC MODULES:
      MIME::Head
      MIME::Body
      MIME::Entity
      MIME::Parser
      MIME::Decoder::Base64
      MIME::Decoder::NBit
      MIME::Decoder::UU
      MIME::Decoder::Gzip64
    BEGIN failed--compilation aborted at /usr/sbin/amavisd line 237.
                                                               [FAILED]
    [root@box1 postfix]#
    I googled this error and found that these packages should be in perl-MIME-tools RPM.

    Though I have installed the latest version, still I am getting error.
    Code:
    [root@box1 postfix]# yum list installed | grep perl-MIME-tools
    perl-MIME-tools.noarch                   5.502-1.el5.rft               installed
    Please HELP :(
     
  14. vikas027

    vikas027 New Member

    Solved !!

    Hi OP,

    Just solved the issue.

    Seems like perl-MIME-tools-5.502 does not contain the packages but perl-MIME-tools-5.425 did.

    Although this is weird but but uninstalling v5.502 and installing 5.425 helped me out.

    You can download perl-MIME-tools-5.425 from here.
    It has a dependency which can be downloaded from here

    Hope this helps.

    Thanks all.
     
  15. ebreaka

    ebreaka New Member

    Great, I manually installed perl-MIME-tools to the latest version, I will downgrade to see and will reply if it work for me :) thanks for that one
     
  16. ebreaka

    ebreaka New Member

    Great, this worked also for me... Thanks a lot for this solution... I first tried the 5.428 version without success either... I really had to use the 5.425... Thanks also to you Falko for your help. :)
     

Share This Page