Error while installing `XML::Parser` Perl module

0

I'm trying to install some Perl module, but I got a strange error:

sudo cpanm XML::Parser

cp Parser/Encodings/iso-8859-5.enc blib/lib/XML/Parser/Encodings/iso-8859-5.enc
make[1]: Entering directory `/root/.cpanm/work/1383241509.7912/XML-Parser-2.41/Expat'
cp Expat.pm ../blib/lib/XML/Parser/Expat.pm
/usr/bin/perl /usr/share/perl/5.14.2/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl/5.14/ExtUtils/typemap -typemap typemap  Expat.xs > Expat.xsc && mv Expat.xs$
cc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVER$
Expat.xs:12:19: fatal error: expat.h: No such file or directory
compilation terminated.
make[1]: *** [Expat.o] Error 1
make[1]: Leaving directory `/root/.cpanm/work/1383241509.7912/XML-Parser-2.41/Expat'
make: *** [subdirs] Error 2
-> FAIL Installing XML::Parser failed. See /root/.cpanm/work/1383241509.7912/build.log for details. Retry with --force to force install it.

How can I fix this problem?

user268365

Posted 2013-10-31T17:51:11.850

Reputation:

Did you See /root/.cpanm/work/1383241509.7912/build.log for details? – daxlerod – 2013-10-31T17:55:29.267

This code is from the log file – None – 2013-10-31T18:02:36.487

Answers

1

I found a solution with this apt-get command:

sudo apt-get install expat
sudo apt-get install libexpat1-dev

user268365

Posted 2013-10-31T17:51:11.850

Reputation: