Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537420 - =mail-filter/amavisd-new-2.10.1-r1 - fetch_modules: error loading optional module Razor2/Client/Agent.pm: Can't locate Getopt/Long.pm: Permission denied at /usr/lib/perl5/vendor_perl/5.18.2/hppa2.0-linux-debug-thread-multi/Razor2/Client/Agent.pm line 15.
Summary: =mail-filter/amavisd-new-2.10.1-r1 - fetch_modules: error loading optional mo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-23 08:40 UTC by Jeroen Roovers (RETIRED)
Modified: 2022-10-16 17:18 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
logs from amavid debug (log.txt,11.08 KB, text/plain)
2021-08-06 04:14 UTC, Stopi
Details
emmerge --info (portage.txt,5.77 KB, text/plain)
2021-08-06 04:16 UTC, Stopi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2015-01-23 08:40:31 UTC
# /usr/sbin/amavisd
fetch_modules: error loading optional module Razor2/Client/Agent.pm:
  Can't locate Getopt/Long.pm:   Permission denied at /usr/lib/perl5/vendor_perl/5.18.2/hppa2.0-linux-debug-thread-multi/Razor2/Client/Agent.pm line 15.
  BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.18.2/hppa2.0-linux-debug-thread-multi/Razor2/Client/Agent.pm line 15.       
  Compilation failed in require at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/DKIM.pm:
  Can't locate Mail/DKIM.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Image/Info.pm:
  Can't locate Image/Info.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Image/Info/GIF.pm:
  Can't locate Image/Info/GIF.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Image/Info/JPEG.pm:
  Can't locate Image/Info/JPEG.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Image/Info/PNG.pm:
  Can't locate Image/Info/PNG.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Image/Info/BMP.pm:
  Can't locate Image/Info/BMP.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Image/Info/TIFF.pm:
  Can't locate Image/Info/TIFF.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF.pm:
  Can't locate Mail/SPF.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Server.pm:
  Can't locate Mail/SPF/Server.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Request.pm:
  Can't locate Mail/SPF/Request.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mech.pm:
  Can't locate Mail/SPF/Mech.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mech/A.pm:
  Can't locate Mail/SPF/Mech/A.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mech/PTR.pm:
  Can't locate Mail/SPF/Mech/PTR.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mech/All.pm:
  Can't locate Mail/SPF/Mech/All.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mech/Exists.pm:
  Can't locate Mail/SPF/Mech/Exists.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mech/IP4.pm:
  Can't locate Mail/SPF/Mech/IP4.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mech/IP6.pm:
  Can't locate Mail/SPF/Mech/IP6.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mech/Include.pm:
  Can't locate Mail/SPF/Mech/Include.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mech/MX.pm:
  Can't locate Mail/SPF/Mech/MX.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mod.pm:
  Can't locate Mail/SPF/Mod.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mod/Exp.pm:
  Can't locate Mail/SPF/Mod/Exp.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/Mod/Redirect.pm:
  Can't locate Mail/SPF/Mod/Redirect.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/SenderIPAddrMech.pm:
  Can't locate Mail/SPF/SenderIPAddrMech.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/v1/Record.pm:
  Can't locate Mail/SPF/v1/Record.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Mail/SPF/v2/Record.pm:
  Can't locate Mail/SPF/v2/Record.pm:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/NetAddr/IP/_compV6.al:
  Can't locate auto/NetAddr/IP/_compV6.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/NetAddr/IP/short.al:
  Can't locate auto/NetAddr/IP/short.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/NetAddr/IP/InetBase/inet_any2n.al:
  Can't locate auto/NetAddr/IP/InetBase/inet_any2n.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/NetAddr/IP/InetBase/inet_n2ad.al:
  Can't locate auto/NetAddr/IP/InetBase/inet_n2ad.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/NetAddr/IP/InetBase/inet_n2dx.al:
  Can't locate auto/NetAddr/IP/InetBase/inet_n2dx.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/NetAddr/IP/InetBase/inet_ntoa.al:
  Can't locate auto/NetAddr/IP/InetBase/inet_ntoa.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/NetAddr/IP/InetBase/ipv6_aton.al:
  Can't locate auto/NetAddr/IP/InetBase/ipv6_aton.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/NetAddr/IP/InetBase/ipv6_ntoa.al:
  Can't locate auto/NetAddr/IP/InetBase/ipv6_ntoa.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/Crypt/OpenSSL/RSA/new_key_from_parameters.al:
  Can't locate auto/Crypt/OpenSSL/RSA/new_key_from_parameters.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/Crypt/OpenSSL/RSA/get_key_parameters.al:
  Can't locate auto/Crypt/OpenSSL/RSA/get_key_parameters.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module auto/Crypt/OpenSSL/RSA/import_random_seed.al:
  Can't locate auto/Crypt/OpenSSL/RSA/import_random_seed.al:   Permission denied at /usr/sbin/amavisd line 209.
fetch_modules: error loading optional module Error.pm:
  Can't locate Error.pm:   Permission denied at /usr/sbin/amavisd line 209.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2015-01-23 08:41:41 UTC
Fri 23 Jan 09:41:09 CET 2015
emerge --info amavisd-new
Portage 2.2.14 (python 3.4.1-final-0, default/linux/hppa/13.0, gcc-4.8.3, glibc-2.19-r1, 3.17.7-gentoo-JeR parisc64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.17.7-gentoo-JeR-parisc64-PA8800_-Mako-with-gentoo-2.2
KiB Mem:     8231532 total,   5635196 free
KiB Swap:    2101676 total,   2101676 free
Timestamp of tree: Fri, 23 Jan 2015 04:15:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.1 hppa2.0-unknown-linux-gnu [enabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p53
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.9-r1, 3.2.5-r6, 3.3.5-r1, 3.4.1
dev-util/ccache:          3.1.9-r4
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6-r1, 1.12.6, 1.13.4
sys-devel/binutils:       2.22-r1, 2.23.1, 2.23.2, 2.24-r3
sys-devel/gcc:            4.6.3, 4.6.4, 4.7.2-r1, 4.7.3-r1, 4.8.1-r1, 4.8.3, 4.8.4, 4.9.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.4
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.16 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo JeR
ACCEPT_KEYWORDS="hppa"
ACCEPT_LICENSE="*"
CBUILD="hppa2.0-unknown-linux-gnu"
CFLAGS="-mschedule=8000 -march=2.0 -ggdb -Wall -Wformat=2 -O2 -pipe -Wno-comment"
CHOST="hppa2.0-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/distcc/bin /usr/share/gnupg/qualified.txt /var/bind /var/spool/torque /var/www/localhost/htdocs/wordpress/wp-config.php"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-mschedule=8000 -march=2.0 -ggdb -Wall -Wformat=2 -O2 -pipe"
DISTDIR="/world/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n --autounmask=n"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs buildpkg cgroup compressdebug config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news notitles parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict test test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-mschedule=8000 -march=2.0 -ggdb -Wall -Wformat=2 -O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ http://gentoo.mneisen.org/ http://mirror.netcologne.de/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://mirror.leaseweb.com/gentoo/ http://gentoo.tiscali.nl/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_GB.utf8"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/keeps/gentoo/packages/karsten"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/dev/shm"
PORTDIR="/world/gentoo/portage"
PORTDIR_OVERLAY="/keeps/gentoo/local"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="256-color X acl alsa amr anacron apng audit bash-completion beautifulsoup3 berkdb bfio bittorrent bzip2 cairo canberra cli consolekit coverage cracklib crossdev crypt cups custom-cflags cxx dane dbus declarative dirac directfb distinct-l dlz doc dot dri emacs exceptions exif expat fbcon filecaps firefox firmware foomaticdb fortran frontend-optional g-sorcery gbm gdbm geoip geoloc glep gles1 gles2 gost gpm graphite gsm gstreamer gtk gudev guile hddtemp hppa hwdb iconv idn imlib inotify ipv6 jadetex javascript jingle jit jpeg jpeg2k json kdrive kmod ladspa lasi launch-frontend libcaca libcanberra libevent libopts libsoxr libusb libwww lua lzma lzo mad mng mod modplug modules mp3 multislot multitarget munge nagios ncurses netlink nfs nls nptl objc objc++ objc-gc offensive openexr opengl openmp openrc openvg opus oqgraph osmesa oss pam pcre php pic pkcs11 png pnm policykit python qt qt3support qt4 readline realtime regression-test rtmp samba sbc schroedinger sctp session smi socks5 speex spell spidermonkey sqlite ssl tcl tcpd test tga theora threads tiff tk tokyocabinet truetype unicode unwind v4l vim-syntax vorbis vpx wayland wcwidth x264 xa xattr xcb xft xhtml xkb xml2 xvfb xvid zlib" ALSA_CARDS="ad1889 usb-audio" APACHE2_MODULES="authz_host dir mime alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="nss" DRACUT_MODULES="nfs syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev joystick keyboard mouse acecad aiptek calcomp citron digitaledge dmc dynapro elo2300 elographics fpit hyperpen jamstudio magellan microtouch mutouch palmax penmount spaceorb summa tek4957 tslib ur98 void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en nl he" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="stifb dummy" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

mail-filter/amavisd-new-2.10.1-r1 was built with the following:
USE="clamav dkim ldap mysql postgres razor snmp spamassassin zmq -courier -qmail"
Comment 2 Thomas Raschbacher gentoo-dev 2019-08-21 20:15:16 UTC
I would appreciate if someone from the perl herd could have a quick look at this.. maybe it is just something simple?
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-08-29 11:16:24 UTC
Looks like system misconfiguration.

Please run:


/usr/bin/perl -e 'for (@INC) { print "$_: "; if ( stat "$_/Getopt/Long.pm" ) { print "\e[32m:)\e[0m\n" } else { print "$!\n" } }'

And report back.

> Can't locate Getopt/Long.pm:  

^ this indicates perl can't access modules that shipped with itself.

For instance, if I make:

/usr/local/lib64/perl5

Exist and not be readable, perl will indeed do:

> /usr/bin/perl -MGetopt::Long -e 1
> Can't locate Getopt/Long.pm:   /usr/local/lib64/perl5/5.30.0/x86_64-linux/Getopt/Long.pm: Permission denied.
> BEGIN failed--compilation aborted.

And the script above shows you why:

/etc/perl: No such file or directory
/usr/local/lib64/perl5/5.30.0/x86_64-linux: Permission denied  
/usr/local/lib64/perl5/5.30.0: Permission denied
/usr/lib64/perl5/vendor_perl/5.30.0/x86_64-linux: No such file or directory
/usr/lib64/perl5/vendor_perl/5.30.0: No such file or directory
/usr/local/lib64/perl5: Permission denied
/usr/lib64/perl5/vendor_perl/5.28.0: No such file or directory
/usr/lib64/perl5/vendor_perl/5.26.2: No such file or directory
/usr/lib64/perl5/vendor_perl/5.26.1: No such file or directory
/usr/lib64/perl5/vendor_perl/5.24.2: No such file or directory
/usr/lib64/perl5/vendor_perl/5.24.1: No such file or directory
/usr/lib64/perl5/vendor_perl/5.24.0: No such file or directory
/usr/lib64/perl5/vendor_perl/5.22.2: No such file or directory
/usr/lib64/perl5/vendor_perl: No such file or directory
/usr/lib64/perl5/5.30.0/x86_64-linux: No such file or directory
/usr/lib64/perl5/5.30.0: :)


The first time perl gets "permission denied" in that list it decides it can't keep searching, and bails with module-not-found, even though, the module was in the search path (in the last place)

This is annoyingly a change in behaviour in perl itself that went down roughly around the time this bug was filed, and it made a lot of people unhappy.
Comment 4 Jens Reinemuth 2019-09-09 08:33:39 UTC
pokoelnReloaded ~ # /usr/bin/perl -e 'for (@INC) { print "$_: "; if ( stat "$_/Getopt/Long.pm" ) { print "\e[32m:)\e[0m\n" } else { print "$!\n" } }'                                                                                           /etc/perl: No such file or directory                                                                                    /usr/local/lib64/perl5/5.30.0/x86_64-linux-thread-multi: No such file or directory                                      /usr/local/lib64/perl5/5.30.0: No such file or directory                                                                /usr/lib64/perl5/vendor_perl/5.30.0/x86_64-linux-thread-multi: No such file or directory                                /usr/lib64/perl5/vendor_perl/5.30.0: No such file or directory                                                          /usr/local/lib64/perl5: No such file or directory                                                                       /usr/lib64/perl5/vendor_perl: No such file or directory                                                                 /usr/lib64/perl5/5.30.0/x86_64-linux-thread-multi: No such file or directory                                            /usr/lib64/perl5/5.30.0: :)   

But error exists here... 

Portage 2.3.75 (python 3.6.9-final-0, default/linux/amd64/17.0, gcc-9.1.0, glibc-2.29-r5, 5.2.0-pf7-x86_64 x86_64)      =================================================================                                                                                System Settings                                                                                =================================================================                                                       System uname: Linux-5.2.0-pf7-x86_64-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.6                     KiB Mem:    32688872 total,  14040612 free                                                                              KiB Swap:   33554424 total,  33554424 free                                                                              Timestamp of repository gentoo: Mon, 09 Sep 2019 05:30:01 +0000                                                         Head commit of repository gentoo: c5740af0a286e794f23da74d11435a6924209078                                              Timestamp of repository gitlab: Tue, 03 Sep 2019 11:05:49 +0000                                                         Head commit of repository gitlab: de5c50e4c9d80a8e2dd29cdddcf704de0d77e3a6                                                                                                                                                                      Timestamp of repository matrix: Tue, 20 Aug 2019 14:05:56 +0000                                                         Head commit of repository matrix: 079013fd081c092ae503019259da16c8f712d135                                                                                                                                                                      sh bash 5.0_p11                                                                                                         ld GNU ld (Gentoo 2.32 p2) 2.32.0                                                                                       ccache version 3.7.3 [enabled]                                                                                          app-shells/bash:          5.0_p11::gentoo                                                                               dev-java/java-config:     2.2.0-r4::gentoo                                                                              dev-lang/perl:            5.30.0::gentoo                                                                                dev-lang/python:          2.7.16::gentoo, 3.5.7::gentoo, 3.6.9::gentoo, 3.7.4-r1::gentoo                                dev-util/ccache:          3.7.3::gentoo                                                                                 dev-util/cmake:           3.15.3::gentoo                                                                                dev-util/pkgconfig:       0.29.2::gentoo                                                                                sys-apps/baselayout:      2.6-r1::gentoo                                                                                sys-apps/openrc:          0.42.1::gentoo                                                                                sys-apps/sandbox:         2.18::gentoo                                                                                  sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo                                                              sys-devel/automake:       1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo                                       sys-devel/binutils:       2.32-r1::gentoo                                                                               sys-devel/gcc:            9.1.0-r1::gentoo, 9.2.0::gentoo                                                               sys-devel/gcc-config:     2.0::gentoo                                                                                   sys-devel/libtool:        2.4.6-r5::gentoo                                                                              sys-devel/make:           4.2.1-r4::gentoo                                                                              sys-kernel/linux-headers: 5.2::gentoo (virtual/os-headers)                                                              sys-libs/glibc:           2.29-r5::gentoo
Comment 5 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-09-09 20:49:25 UTC
(In reply to Jens Reinemuth from comment #4)
> pokoelnReloaded ~ # /usr/bin/perl -e 'for (@INC) { print "$_: "; if ( stat
> "$_/Getopt/Long.pm" ) { print "\e[32m:)\e[0m\n" } else { print "$!\n" } }'  
> /etc/perl: No such file or directory                                        
> /usr/local/lib64/perl5/5.30.0/x86_64-linux-thread-multi: No such file or
> directory                                     
> /usr/local/lib64/perl5/5.30.0: No such file or directory                    
> /usr/lib64/perl5/vendor_perl/5.30.0/x86_64-linux-thread-multi: No such file
> or directory                               
> /usr/lib64/perl5/vendor_perl/5.30.0: No such file or directory              
> /usr/local/lib64/perl5: No such file or directory                           
> /usr/lib64/perl5/vendor_perl: No such file or directory                     
> /usr/lib64/perl5/5.30.0/x86_64-linux-thread-multi: No such file or directory
> /usr/lib64/perl5/5.30.0: :)   
> 
> But error exists here... 


Based on that output:

- Getopt::Long is definitely installed
- There is nothing in the standard Perl environment that would prevent it working

And I assume something like 'perl -MGetopt::Long -e1' exits without errors as a standard user.


If that last statement is true, and this problem exists, then the probable cause is something in amavisd being different.

- Try executing the command above as the user amavisd runs as and see if any permissions errors happen

If no errors occur, then the likely problem may be some code in amavis changing @INC to an @INC it can't read, somewhere.

But I can't really commend too much on that part.
Comment 6 Mark Gomersbach 2020-08-24 06:52:12 UTC
When I created "/var/amavis" (although the ebuild tells me to remove it) all the problems went away for me, so I guess somewhere in the code this is still hardcoded maybe.
Comment 7 Stopi 2021-08-06 04:14:48 UTC
Created attachment 730591 [details]
logs from amavid debug
Comment 8 Stopi 2021-08-06 04:16:40 UTC
Created attachment 730594 [details]
emmerge --info

I have similar issue with freshly installed server (no migration).
(See previous attachment)

also I've created the directory mentioned here but it didn't help.

# ls -la /var/amavis/
total 10
drwxr-xr-x  3 amavis amavis  3 Aug  5 13:49 .
drwxr-xr-x 13 root   root   16 Aug  5 13:49 ..
Comment 9 Stopi 2021-08-06 04:35:02 UTC
Also tried few commands from this thread:

# /usr/bin/perl -e 'for (@INC) { print "$_: "; if ( stat "$_/Getopt/Long.pm" ) { print "\e[32m:)\e[0m\n" } else { print "$!\n" } }'
/etc/perl: No such file or directory
/usr/local/lib64/perl5/5.34/x86_64-linux: No such file or directory
/usr/local/lib64/perl5/5.34: No such file or directory
/usr/lib64/perl5/vendor_perl/5.34/x86_64-linux: No such file or directory
/usr/lib64/perl5/vendor_perl/5.34: No such file or directory
/usr/lib64/perl5/5.34/x86_64-linux: No such file or directory
/usr/lib64/perl5/5.34: :)
/usr/lib64/perl5/5.32: No such file or directory
/usr/lib64/perl5/vendor_perl/5.32: No such file or directory

# perl -MGetopt::Long -e1 && echo $?
0
Comment 10 Stopi 2021-08-09 07:53:36 UTC
OK, I don't know exactly what I did but I've fixed it.

When I first posted, on last Friday, I've tried a bunch of things (including updating @world and rebuild perl packages I saw in the logs).
Nothing seemed to work.

Today (Monday), I ran the command 'amavid debug' in a new screen window and it worked.
I then tried to go back to the previous window where it was failing on Friday (luckily I didn't close it) then it failed again.

So if you struggle with this issue, just try to refresh the bash environment, it might work.
Amavis is now working for me...
Comment 11 Stopi 2021-08-09 08:03:43 UTC
By the way, I didn't create the directory /var/amavis.
Instead I've make a link to the existing amavis home created by portage.

# ln -s /var/lib/amavishome /var/amavis
Comment 12 Andreas K. Hüttel archtester gentoo-dev 2022-10-16 17:18:24 UTC
(In reply to Stopi from comment #10)
> OK, I don't know exactly what I did but I've fixed it.
> 
> When I first posted, on last Friday, I've tried a bunch of things (including
> updating @world and rebuild perl packages I saw in the logs).
> Nothing seemed to work.
> 
> Today (Monday), I ran the command 'amavid debug' in a new screen window and
> it worked.
> I then tried to go back to the previous window where it was failing on
> Friday (luckily I didn't close it) then it failed again.
> 
> So if you struggle with this issue, just try to refresh the bash
> environment, it might work.
> Amavis is now working for me...

Excellent.