I’ve seen this once before and couldn’t remember the exact package I needed to update, so I figured I’d make a post about it so I could find it easily if I came across this again.
Sometimes when emergeing new packages you will get an error like the following:
checking for perl… /usr/bin/perl
checking for XML::Parser… configure: error: XML::Parser perl module is required for intltool
!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! ERROR: x11-misc/xkeyboard-config-0.8-r1 failed.
ebuild.sh, line 1621: Called dyn_compile
ebuild.sh, line 973: Called qa_call ‘src_compile’
ebuild.sh, line 44: Called src_compile
xkeyboard-config-0.8-r1.ebuild, line 49: Called econf ‘–with-xkb-base=/usr/share/X11/xkb’ ‘–enable-compat-rules’ ‘–disable-xkbcomp-symlink’ ‘–with-xkb-rules-symlink=xorg’
ebuild.sh, line 578: Called die
!!! econf failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at ‘/var/tmp/portage/x11-misc/xkeyboard-config-0.8-r1/temp/build.log’.
Thanks to this post on karakas-online.de, we can see that this probably really means that perl is unable to load the XML::Parser. You can run the following command at the command line to see exactly why that’s happening:
# /usr/bin/perl -e “require XML::Parser”
In my case this resulted in:
Can’t load ‘/usr/lib/perl5/vendor_perl/5.8.8/i686-linux/auto/XML/Parser/Expat/Expat.so’ for module XML::Parser::Expat: libexpat.so.1: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i686-linux/DynaLoader.pm line 230.
at /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/XML/Parser.pm line 14
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/XML/Parser.pm line 14.
BEGIN failed–compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/XML/Parser.pm line 18.
Compilation failed in require at -e line 1.
And so, even though this package was already installed, I just remerged it, replacing what was there before like so:
emerge -av XML-Parser
After doing this, you should be able to continue your original emerge. I’m not sure what is happening to this package that requires you to do this, but it seems to fix the problem. *shrug*