Trouble with installing packages in Gentoo due to XML::Parser errors

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
!!! /var/tmp/portage/x11-misc/xkeyboard-config-0.8-r1/work/xkeyboard-config-0.8/config.log
!!! ERROR: x11-misc/xkeyboard-config-0.8-r1 failed.
Call stack:, line 1621: Called dyn_compile, line 973: Called qa_call ‘src_compile’, 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’, 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, 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/’ for module XML::Parser::Expat: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i686-linux/ line 230.
at /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/XML/ line 14
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/XML/ line 14.
BEGIN failed–compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/XML/ 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*

Leave a comment

Your email address will not be published. Required fields are marked *