title: (still) cannot properly install lxml 2.3 for python, but at least 2.2.8 works
body: <ul>
  <li><p><em>30 jun 2011</em> -- I am awarding @Pablo for this question, because of his <a href="https://stackoverflow.com/questions/6417881/updated-29-june-still-cannot-properly-install-lxml-for-python/6523725#6523725">answer</a>. 
  I am still unable to properly install lxml 2.3 for reasons discussed in his comments. I gather for a little bit of work I could, but I have already spent a ridiculous amount of time on this problem. I have, however, written the code I needed and successfully installed lxml 2.2.8. The code functions with this version. Better yet, Pablo was the only one to properly diagnose the error. Which was libxslt needed to be updated to a version with support for <code>exsltMathXpathCtxtRegister</code> I appreciate everyones help on this question.</p></li>
  <li><p><em>29 jun 2011 -- updating this question to reflect comments and to greater document my attempts</em></p></li>
  </ul>
  
  <hr>
  
  <p>I should begin by saying I have tried every possible solution and install scenario imaginable. Yes, there are similar questions with this topic but their specific problem and solution are not my own. I have spent about 10-15 hours on this and I only continue to become more perplexed.</p>
  
  <p><b>My Main Concern</b></p>
  
  <p>In short, after installing lxml-2.3 from source <strong>or</strong> with <code>easy_install-2.7 lxml</code> for python2.7 on centOs5.6, an alternate install of python, I cannot import the module properly. It will install without any obvious error, but It returns the following error when trying to import etree:</p>
  
  <pre><code>Python 2.7.2 (default, Jun 16 2011, 11:53:48) 
  [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import lxml
  &gt;&gt;&gt; from lxml import etree
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: /usr/local/lib/python2.7/site-packages/lxml-2.3-py2.7-linux-x86_64.egg/lxml/etree.so: undefined symbol: exsltMathXpathCtxtRegister
  </code></pre>
  
  <p><b>What I have Tried</b></p>
  
  <ol>
  <li><p>The two most common suggestions I have encountered are to make sure <code>libxml2 &amp;&amp; libxml2-dev</code> and <code>libxslt1 &amp;&amp; libxslt1-dev</code>They are. I have installed them through yum. </p>
  
  <blockquote>
    <p>$ yum list libxslt libxslt-devel libxml2
    libxml2-devel Loaded plugins:
    fastestmirror Installed Packages
    libxml2.i386<br>
    2.6.26-2.1.2.8.el5_5.1                           installed libxml2.x86_64<br>
    2.6.26-2.1.2.8.el5_5.1                           installed libxml2-devel.i386<br>
    2.6.26-2.1.2.8.el5_5.1                           installed libxml2-devel.x86_64<br>
    2.6.26-2.1.2.8.el5_5.1                           installed libxslt.i386<br>
    1.1.17-2.el5_2.2                                 installed libxslt.x86_64<br>
    1.1.17-2.el5_2.2                                 installed libxslt-devel.i386<br>
    1.1.17-2.el5_2.2                                 installed libxslt-devel.x86_64<br>
    1.1.17-2.el5_2.2                                 installed</p>
  </blockquote></li>
  <li><p>Re-installed and Confirmed that <code>zlib &amp;&amp; zlib-devel</code> are installed.</p>
  
  <blockquote>
    <p>$ yum list zlib zlib-devel Loaded
    plugins: fastestmirror Installed
    Packages zlib.i386<br>
    1.2.3-3                                    installed zlib.x86_64<br>
    1.2.3-3                                    installed zlib-devel.i386<br>
    1.2.3-3                                    installed zlib-devel.x86_64<br>
    1.2.3-3                                    installed</p>
  </blockquote></li>
  <li><p>Confirmed <code>python-devel</code> is installed. I think. </p>
  
  <p>a. According to several things I have read a way to check if python-devel is installed is to <code>import distutils</code>. regoogling this question brings <a href="http://sourceforge.net/apps/mediawiki/gribble/index.php?title=Supybot_Install_Guide#Install_Python" rel="nofollow noreferrer">this</a> up quickly.</p>
  
  <p>b. @Keith suggested I tried to 'install' it anyhow, using <a href="ftp://ftp.pycopia.org/pub/python/RHEL51/python2.7-2.7.1-1TH.src.rpm" rel="nofollow noreferrer">this</a>, however, I encountered an error</p>
  
  <pre><code>    &gt; error: cannot create %sourcedir /usr/src/redhat/SOURCES
  </code></pre>
  
  <p>so, I created the dir, and it has since installed. But with no success. </p></li>
  <li><p>I can, however, <code>import xml.etree.cElementTree as etree</code> and/or <code>import xml.etree.ElementTree as etree</code>, but I do require some specific functionality from <code>lxml.etree</code></p></li>
  <li><p>Oddly, If I try to install lxml under the assumption the dependencies not installed and try something like the following </p>
  
  <p><code>sudo STATIC_DEPS=true easy_install-2.7 lxml 2&gt;&amp;1 | tee -a ~/.lxml</code></p>
  
  <p>it fails with the outputting the error below. I should tersely note, for the unfamiliar, this seems to solve many people's issues as it will go out and retrieve any dependencies and install them for install lxml.</p>
  
  <p><code>tail -100 ~/.lxml</code></p>
  
  <blockquote>
    <p>gcc -DHAVE_CONFIG_H -I. -I./include
    -I./include  -D_REENTRANT    -I/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/include
    -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -c runsuite.c gcc -DHAVE_CONFIG_H -I.
    -I./include -I./include  -D_REENTRANT    -I/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/include
    -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -c testchar.c testapi.c: In function
    ‘test_xmlBufferSetAllocationScheme’:
    testapi.c:18773: warning: comparison
    of distinct pointer types lacks a cast
    gcc -DHAVE_CONFIG_H -I. -I./include
    -I./include  -D_REENTRANT    -I/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/include
    -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -c testdict.c gcc -DHAVE_CONFIG_H -I.
    -I./include -I./include  -D_REENTRANT    -I/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/include
    -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -c runxmlconf.c gcc -DHAVE_CONFIG_H -I.
    -I./include -I./include  -D_REENTRANT    -I/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/include
    -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -c testrecurse.c sed -e
    's?\@XML_LIBDIR\@?-L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib?g'
    \
          -e 's?\@XML_INCLUDEDIR\@?-I/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/include/libxml2 -I/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/include?g'
    \
          -e 's?\@VERSION\@?2.7.8?g' \
          -e 's?\@XML_LIBS\@?-lxml2 -lz  -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -liconv -lm ?g' \
             &lt; ./xml2Conf.sh.in > xml2Conf.tmp \  &amp;&amp; mv xml2Conf.tmp
    xml2Conf.sh /bin/sh ./libtool --tag=CC
    --mode=link gcc  -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -module -no-undefined -avoid-version -rpath /tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib  -o testdso.la  testdso.lo   testapi.c: At top level: testapi.c:17989:
    warning: ‘gen_xmlSchematronPtr’
    defined but not used testapi.c:17992:
    warning: ‘des_xmlSchematronPtr’
    defined but not used testapi.c:18009:
    warning:
    ‘gen_xmlSchematronParserCtxtPtr’
    defined but not used testapi.c:18012:
    warning:
    ‘des_xmlSchematronParserCtxtPtr’
    defined but not used testapi.c:34157:
    warning: ‘gen_xmlSAXHandlerPtr_ptr’
    defined but not used testapi.c:34160:
    warning: ‘des_xmlSAXHandlerPtr_ptr’
    defined but not used libtool: link: ar
    cru .libs/testdso.a  testdso.o
    libtool: link: ranlib .libs/testdso.a
    libtool: link: ( cd ".libs" &amp;&amp; rm -f
    "testdso.la" &amp;&amp; ln -s "../testdso.la"
    "testdso.la" ) /bin/sh ./libtool
    --tag=CC   --mode=link gcc  -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls  -version-info 9:8:7 -ldl  -o libxml2.la -rpath
    /tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib SAX.lo entities.lo encoding.lo
    error.lo parserInternals.lo parser.lo
    tree.lo hash.lo list.lo xmlIO.lo
    xmlmemory.lo uri.lo valid.lo xlink.lo
    HTMLparser.lo HTMLtree.lo debugXML.lo
    xpath.lo xpointer.lo xinclude.lo
    nanohttp.lo nanoftp.lo DOCBparser.lo
    catalog.lo globals.lo threads.lo
    c14n.lo xmlstring.lo xmlregexp.lo
    xmlschemas.lo xmlschemastypes.lo
    xmlunicode.lo xmlreader.lo relaxng.lo
    dict.lo SAX2.lo xmlwriter.lo legacy.lo
    chvalid.lo pattern.lo xmlsave.lo
    xmlmodule.lo schematron.lo -lz
    -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -liconv -lm   libtool: link: ar cru .libs/libxml2.a  SAX.o entities.o
    encoding.o error.o parserInternals.o
    parser.o tree.o hash.o list.o xmlIO.o
    xmlmemory.o uri.o valid.o xlink.o
    HTMLparser.o HTMLtree.o debugXML.o
    xpath.o xpointer.o xinclude.o
    nanohttp.o nanoftp.o DOCBparser.o
    catalog.o globals.o threads.o c14n.o
    xmlstring.o xmlregexp.o xmlschemas.o
    xmlschemastypes.o xmlunicode.o
    xmlreader.o relaxng.o dict.o SAX2.o
    xmlwriter.o legacy.o chvalid.o
    pattern.o xmlsave.o xmlmodule.o
    schematron.o libtool: link: ranlib
    .libs/libxml2.a libtool: link: ( cd
    ".libs" &amp;&amp; rm -f "libxml2.la" &amp;&amp; ln -s
    "../libxml2.la" "libxml2.la" ) /bin/sh
    ./libtool --tag=CC   --mode=link gcc 
    -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls   -o xmllint xmllint.o ./libxml2.la  -lz
    -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -liconv -lm   /bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls   -o xmlcatalog xmlcatalog.o ./libxml2.la 
    -lz -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -liconv -lm   /bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls   -o testSchemas testSchemas.o ./libxml2.la
    -lz -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -liconv -lm   /bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls   -o testRelax testRelax.o ./libxml2.la 
    -lz -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -liconv -lm   /bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls   -o testSAX testSAX.o ./libxml2.la  -lz
    -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -liconv -lm   libtool: link: gcc -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -o testSAX testSAX.o  ./.libs/libxml2.a
    -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -ldl -lz /tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib/libiconv.a
    -lm libtool: link: gcc -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -o testRelax testRelax.o 
    ./.libs/libxml2.a
    -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -ldl -lz /tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib/libiconv.a
    -lm libtool: link: gcc -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -o xmlcatalog xmlcatalog.o 
    ./.libs/libxml2.a
    -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -ldl -lz /tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib/libiconv.a
    -lm libtool: link: gcc -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -o testSchemas testSchemas.o 
    ./.libs/libxml2.a
    -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -ldl -lz /tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib/libiconv.a
    -lm libtool: link: gcc -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -o xmllint xmllint.o  ./.libs/libxml2.a
    -L/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib -ldl -lz /tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2/lib/libiconv.a
    -lm ./..libs/libxml2.a(/.xmlIO.o):libs In function <code>xmlGzfileOpenW':
    //tmp/libxml2.aeasy_install-(Y2MKTgxmlIO.o/):lxml
    -2.3/In build/function tmp/</code>libxml2xmlGzfileOpenW-':
    2.7.8//xmlIO.c:tmp1247/:easy_install -Y2MKTg/lxml-2.3/build/tmp/undefined libxml2-reference2.7.8/xmlIO.c:1247
    :to  undefined`gzopen64' 
    ./reference.libs/libxml2.a( xmlIO.o):
    In functionto 
    ``xmlGzfileOpen_real':gzopen64'</p>
    
    <p>/./tmp./libs/easy_installlibxml2.a-(xmlIO.oY2MKTg):/lxml-
    In 2.3function/build
    /tmp/<code>libxml2xmlGzfileOpen_real':
    -/2.7.8tmp//xmlIO.ceasy_install:1175-Y2MKTg/:lxml-
    2.3/build/undefinedtmp /referencelibxml2-2.7.8 /toxmlIO.c
    :</code>1175: gzopen64undefined'  reference
    to <code>gzopen64' collect2: collect2: ld
    returned 1 exit status ld returned 1
    exit status make[2]: *** [testRelax]
    Error 1 make[2]: *** Waiting for
    unfinished jobs.... make[2]: ***
    [testSAX] Error 1
    .././.libs/libslibxml2.a/(libxml2.axmlIO.o(xmlIO.o))::
    In function</code> In function
    <code>xmlGzfileOpenW'xmlGzfileOpenW':: /
    tmp/easy_install-Y2MKTg//tmp/lxmleasy_install--Y2MKTg/lxml-2.32.3//build/tmp/buildlibxml2-2.7.8//xmlIO.ctmp:/libxml2-1247:
    undefined reference to
    </code>2.7.8gzopen64/xmlIO.c:1247:
    undefined'  .reference/ .to
    libs/<code>gzopen64libxml2.a'
    (./.xmlIO.olibs/libxml2.a(xmlIO.o)): :
    In Infunction function
    </code>xmlGzfileOpen_real '`:
    xmlGzfileOpen_real/':
    tmp//tmp/easy_install-Y2MKTgeasy_install-/Y2MKTg/lxml-lxml2.3-2.3//build/tmp/build/libxml2tmp/libxml2--2.7.82.7.8/xmlIO.c:/1175:xmlIO.c
    :1175: undefinedundefined  reference
    reference toto  ``gzopen64'
    gzopen64'collect2: ld returned 1 exit
    status</p>
    
    <p>collect2: ld returned 1 exit status
    ./.libs/libxml2.a(xmlIO.o): In
    function <code>xmlGzfileOpenW':
    /tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2-2.7.8/xmlIO.c:1247:
    undefined reference to</code>gzopen64'
    ./.libs/libxml2.a(xmlIO.o): In
    function <code>xmlGzfileOpen_real':
    /tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2-2.7.8/xmlIO.c:1175:
    undefined reference to</code>gzopen64'
    collect2: ld returned 1 exit status
    make<a href="http://sourceforge.net/apps/mediawiki/gribble/index.php?title=Supybot_Install_Guide#Install_Python" rel="nofollow noreferrer">2</a>: <strong>* [testSchemas] Error 1
    make<a href="http://sourceforge.net/apps/mediawiki/gribble/index.php?title=Supybot_Install_Guide#Install_Python" rel="nofollow noreferrer">2</a>: <em></strong> [xmlcatalog] Error 1
    make<a href="http://sourceforge.net/apps/mediawiki/gribble/index.php?title=Supybot_Install_Guide#Install_Python" rel="nofollow noreferrer">2</a>: <strong></em> [xmllint] Error 1
    make<a href="http://sourceforge.net/apps/mediawiki/gribble/index.php?title=Supybot_Install_Guide#Install_Python" rel="nofollow noreferrer">2</a>: Leaving directory
    <code>/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2-2.7.8'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory
    </code>/tmp/easy_install-Y2MKTg/lxml-2.3/build/tmp/libxml2-2.7.8'
    make: *</strong> [all] Error 2 Traceback
    (most recent call last):   File
    "/usr/local/bin/easy_install-2.7",
    line 8, in 
        load_entry_point('setuptools==0.6c11',
    'console_scripts',
    'easy_install-2.7')()   File
    "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
    line 1712, in main   File
    "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
    line 1700, in with_ei_usage   File
    "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
    line 1716, in    File
    "/usr/local/lib/python2.7/distutils/core.py",
    line 152, in setup
        dist.run_commands()   File "/usr/local/lib/python2.7/distutils/dist.py",
    line 953, in run_commands
        self.run_command(cmd)   File "/usr/local/lib/python2.7/distutils/dist.py",
    line 972, in run_command
        cmd_obj.run()   File "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
    line 211, in run   File
    "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
    line 446, in easy_install   File
    "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
    line 476, in install_item   File
    "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
    line 655, in install_eggs   File
    "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
    line 930, in build_and_install   File
    "build/bdist.linux-i686/egg/setuptools/command/easy_install.py",
    line 919, in run_setup   File
    "build/bdist.linux-i686/egg/setuptools/sandbox.py",
    line 62, in run_setup   File
    "build/bdist.linux-i686/egg/setuptools/sandbox.py",
    line 105, in run   File
    "build/bdist.linux-i686/egg/setuptools/sandbox.py",
    line 64, in    File
    "setup.py", line 130, in <br>
    File
    "/tmp/easy_install-Y2MKTg/lxml-2.3/setupinfo.py",
    line 56, in ext_modules   File
    "/tmp/easy_install-Y2MKTg/lxml-2.3/buildlibxml.py",
    line 311, in build_libxml2xslt   File
    "/tmp/easy_install-Y2MKTg/lxml-2.3/buildlibxml.py",
    line 253, in cmmi   File
    "/tmp/easy_install-Y2MKTg/lxml-2.3/buildlibxml.py",
    line 236, in call_subprocess
    Exception: Command "make -j6" returned
    code 2</p>
  </blockquote></li>
  </ol>
  
  <p>there was considerably more, and if you are interested you can check it out <a href="http://pastebin.com/gXdMVHdP" rel="nofollow noreferrer">here</a></p>
  
  <p><strong>I have tried</strong> several other methods of installation. including @agilevic's which returned an error virtually identical to the one above. Most others install effortlessly, but all fail on <code>from lxml import etree</code></p>
  
  <p>Why not use a <code>yum</code>? Well, I was able to install lxml effortlessly through <code>yum install python-lxml</code>, but that was centOs' default installation of python2.4. At this point it is probably easier to retool my existing project to work with 2.4. In the long run, however, I would truly like to resolve this issue. For myself, and anyone else who may encounter a similar problem in the future. </p>