The OpenShift forums have been retired, but you can still read and search them.
For the most up-to-date information about how to use OpenShift please visit

Cannot install XML::Parser from CPAN

I have an App that I'm trying to port to run under OpenShift. One of its dependencies is XML::Parser, but this fails to install. From the build.log:

==> Found dependencies: XML::Parser Searching XML::Parser on cpanmetadb ... --> Working on XML::Parser Fetching -> OK Unpacking XML-Parser-2.41.tar.gz Entering XML-Parser-2.41 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.55_02) Configuring XML-Parser-2.41 Running Makefile.PL

Expat must be installed prior to building XML::Parser and I can't find it in the standard library directories. Install 'expat-devel' package with your OS package manager. See 'README'.

Or you can download expat from:

If expat is installed, but in a non-standard directory, then use the following options to Makefile.PL:

EXPATLIBPATH=...  To set the directory in which to find libexpat

EXPATINCPATH=...  To set the directory in which to find expat.h

For example:

perl Makefile.PL EXPATLIBPATH=/home/me/lib EXPATINCPATH=/home/me/include

Note that if you build against a shareable library in a non-standard location you may (on some platforms) also have to set your LD_LIBRARY_PATH environment variable at run time for perl to find the library.

Checking if your kit is complete... Looks good Writing Makefile for XML::Parser::Expat Writing Makefile for XML::Parser -> OK Finding PREREQ from Makefile ... Checking if you have LWP 0 ... Yes (6.04) Building XML-Parser-2.41 cp Parser/Encodings/x-sjis-cp932.enc blib/lib/XML/Parser/Encodings/x-sjis-cp932.enc cp Parser/Encodings/koi8-r.enc blib/lib/XML/Parser/Encodings/koi8-r.enc cp Parser/Encodings/iso-8859-7.enc blib/lib/XML/Parser/Encodings/iso-8859-7.enc cp Parser/Encodings/ibm866.enc blib/lib/XML/Parser/Encodings/ibm866.enc cp Parser/Style/ blib/lib/XML/Parser/Style/ cp Parser/Encodings/iso-8859-9.enc blib/lib/XML/Parser/Encodings/iso-8859-9.enc cp Parser/Encodings/x-euc-jp-unicode.enc blib/lib/XML/Parser/Encodings/x-euc-jp-unicode.enc cp Parser/Encodings/README blib/lib/XML/Parser/Encodings/README cp Parser/Encodings/euc-kr.enc blib/lib/XML/Parser/Encodings/euc-kr.enc cp Parser/Encodings/windows-1250.enc blib/lib/XML/Parser/Encodings/windows-1250.enc cp Parser/Encodings/windows-1252.enc blib/lib/XML/Parser/Encodings/windows-1252.enc cp Parser/Encodings/big5.enc blib/lib/XML/Parser/Encodings/big5.enc cp Parser/Encodings/Japanese_Encodings.msg blib/lib/XML/Parser/Encodings/Japanese_Encodings.msg cp Parser/Encodings/windows-1255.enc blib/lib/XML/Parser/Encodings/windows-1255.enc cp Parser/Encodings/iso-8859-3.enc blib/lib/XML/Parser/Encodings/iso-8859-3.enc cp Parser/Encodings/iso-8859-4.enc blib/lib/XML/Parser/Encodings/iso-8859-4.enc cp Parser/Style/ blib/lib/XML/Parser/Style/ cp Parser/Encodings/x-euc-jp-jisx0221.enc blib/lib/XML/Parser/Encodings/x-euc-jp-jisx0221.enc cp Parser/Encodings/iso-8859-8.enc blib/lib/XML/Parser/Encodings/iso-8859-8.enc cp Parser/Encodings/iso-8859-2.enc blib/lib/XML/Parser/Encodings/iso-8859-2.enc cp Parser/Encodings/x-sjis-jdk117.enc blib/lib/XML/Parser/Encodings/x-sjis-jdk117.enc cp Parser/Encodings/x-sjis-unicode.enc blib/lib/XML/Parser/Encodings/x-sjis-unicode.enc cp Parser/ blib/lib/XML/Parser/ cp Parser/Style/ blib/lib/XML/Parser/Style/ cp blib/lib/XML/ cp Parser/Style/ blib/lib/XML/Parser/Style/ cp Parser/Encodings/windows-1251.enc blib/lib/XML/Parser/Encodings/windows-1251.enc cp Parser/Encodings/x-sjis-jisx0221.enc blib/lib/XML/Parser/Encodings/x-sjis-jisx0221.enc cp Parser/Style/ blib/lib/XML/Parser/Style/ cp Parser/Encodings/iso-8859-5.enc blib/lib/XML/Parser/Encodings/iso-8859-5.enc make[1]: Entering directory `/var/lib/stickshift/40afe32fb8124f2ea50e541a32664497/.cpanm/work/1337588817.10735/XML-Parser-2.41/Expat' cp ../blib/lib/XML/Parser/ /usr/bin/perl /var/lib/stickshift/40afe32fb8124f2ea50e541a32664497/premier/perl5lib/lib/perl5/ExtUtils/xsubpp -noprototypes -typemap /usr/share/perl5/ExtUtils/typemap -typemap typemap Expat.xs > Expat.xsc && mv Expat.xsc Expat.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DVERSION=\"2.41\" -DXS_VERSION=\"2.41\" -fPIC "-I/usr/lib64/perl5/CORE" Expat.c Expat.xs:12:19: error: expat.h: No such file or directory


Sorry for the late reply as it was tough digging through. It requires expat packages which aren't installed. If you're set on using XML::Parser, please take this to "Vote on Features" so that we can prioritize adding expat packages. Otherwise, the other alternatives are: XML::SAX:PurePerl XML::LibXML


Unfortunately, XML::Parser is actually a dependency for XML::RSS that I'm using to both create and parse RSS feeds. Other RSS modules I've found are geared towards one direction or the other and don't have feature parity. I'll move this to the "Vote on Features".