title: can't installing lxml on Ubuntu 12.04
body: <p>I've been trying to install lxml using <code>pip install lxml</code> and I get the error below.  I've used <code>apt-get install python-dev libxml2 libxml2-dev libxslt-dev</code> before (suggested in other answers) but I still get the same error.  I did not use control-c.</p>
  
  <pre><code>pip install lxml
  Downloading/unpacking lxml
    Downloading lxml-3.2.4.tar.gz (3.3MB): 3.3MB downloaded
    Running setup.py egg_info for package lxml
      /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
        warnings.warn(msg)
      Building lxml version 3.2.4.
      Building without Cython.
      Using build configuration of libxslt 1.1.26
      Building against libxml2/libxslt in the following directory: /usr/lib/x86_64-linux-gnu
  
      warning: no previously-included files found matching '*.py'
      warning: no files found matching '*.txt' under directory 'src/lxml/tests'
  Installing collected packages: lxml
    Running setup.py install for lxml
      /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
        warnings.warn(msg)
      Building lxml version 3.2.4.
      Building without Cython.
      Using build configuration of libxslt 1.1.26
      Building against libxml2/libxslt in the following directory: /usr/lib/x86_64-linux-gnu
      building 'lxml.etree' extension
      gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/mlkang/Envs/env1/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o
      src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_4data':
      src/lxml/lxml.etree.c:97799:74: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData' from incompatible pointer type [enabled by default]
      src/lxml/lxml.etree.c:97400:12: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
      src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_6start':
      src/lxml/lxml.etree.c:97936:75: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart' from incompatible pointer type [enabled by default]
      src/lxml/lxml.etree.c:97100:18: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
      src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_8end':
      src/lxml/lxml.etree.c:97994:73: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd' from incompatible pointer type [enabled by default]
      src/lxml/lxml.etree.c:97324:18: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
      src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_10pi':
      src/lxml/lxml.etree.c:98152:72: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi' from incompatible pointer type [enabled by default]
      src/lxml/lxml.etree.c:97440:18: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
      src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_12comment':
      src/lxml/lxml.etree.c:98205:77: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment' from incompatible pointer type [enabled by default]
      src/lxml/lxml.etree.c:97566:18: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
      src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__xslt_resolve_from_python':
      src/lxml/lxml.etree.c:136086:9: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch]
      src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_4XSLT_18__call__':
      src/lxml/lxml.etree.c:140160:81: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
      src/lxml/lxml.etree.c:138095:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
      src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__copyXSLT':
      src/lxml/lxml.etree.c:141558:79: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
      src/lxml/lxml.etree.c:138095:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
      src/lxml/lxml.etree.c: At top level:
      src/lxml/lxml.etree.c:12770:13: warning: '__pyx_f_4lxml_5etree_displayNode' defined but not used [-Wunused-function]
  gcc: internal compiler error: Killed (program cc1)
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See &lt;file:///usr/share/doc/gcc-4.6/README.Bugs&gt; for instructions.
  error: command 'gcc' failed with exit status 4
  Complete output from command /home/mlkang/Envs/env1/bin/python -c "import setuptools;__file__='/home/mlkang/Envs/env1/build/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-zVBvtO-record/install-record.txt --single-version-externally-managed --install-headers /home/mlkang/Envs/env1/include/site/python2.7:
  /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
  
    warnings.warn(msg)
  
  Building lxml version 3.2.4.
  
  Building without Cython.
  
  Using build configuration of libxslt 1.1.26
  
  Building against libxml2/libxslt in the following directory: /usr/lib/x86_64-linux-gnu
  
  running install
  
  running build
  
  running build_py
  
  creating build
  
  creating build/lib.linux-x86_64-2.7
  
  creating build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/__init__.py -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/_elementpath.py -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/ElementInclude.py -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/cssselect.py -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/usedoctest.py -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/pyclasslookup.py -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/doctestcompare.py -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/sax.py -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/builder.py -&gt; build/lib.linux-x86_64-2.7/lxml
  
  creating build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/__init__.py -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  creating build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/diff.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/_diffcommand.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/__init__.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/clean.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/html5parser.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/_setmixin.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/usedoctest.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/soupparser.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/defs.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/ElementSoup.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/_html5builder.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/formfill.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  copying src/lxml/html/builder.py -&gt; build/lib.linux-x86_64-2.7/lxml/html
  
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron
  
  copying src/lxml/isoschematron/__init__.py -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron
  
  copying src/lxml/lxml.etree.h -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/lxml.etree_api.h -&gt; build/lib.linux-x86_64-2.7/lxml
  
  copying src/lxml/includes/xmlerror.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/schematron.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/config.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/htmlparser.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/xslt.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/c14n.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/xmlparser.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/relaxng.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/uri.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/etreepublic.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/xmlschema.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/dtdvalid.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/xinclude.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/xpath.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/tree.pxd -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/lxml-version.h -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  copying src/lxml/includes/etree_defs.h -&gt; build/lib.linux-x86_64-2.7/lxml/includes
  
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources
  
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
  
  copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng
  
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
  
  copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
  
  copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl
  
  creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  
  copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -&gt; build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1
  
  running build_ext
  
  building 'lxml.etree' extension
  
  creating build/temp.linux-x86_64-2.7
  
  creating build/temp.linux-x86_64-2.7/src
  
  creating build/temp.linux-x86_64-2.7/src/lxml
  
  gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/mlkang/Envs/env1/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o
  
  src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_4data':
  
  src/lxml/lxml.etree.c:97799:74: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxData' from incompatible pointer type [enabled by default]
  
  src/lxml/lxml.etree.c:97400:12: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
  
  src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_6start':
  
  src/lxml/lxml.etree.c:97936:75: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxStart' from incompatible pointer type [enabled by default]
  
  src/lxml/lxml.etree.c:97100:18: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
  
  src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_8end':
  
  src/lxml/lxml.etree.c:97994:73: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxEnd' from incompatible pointer type [enabled by default]
  
  src/lxml/lxml.etree.c:97324:18: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
  
  src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_10pi':
  
  src/lxml/lxml.etree.c:98152:72: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxPi' from incompatible pointer type [enabled by default]
  
  src/lxml/lxml.etree.c:97440:18: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
  
  src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_11TreeBuilder_12comment':
  
  src/lxml/lxml.etree.c:98205:77: warning: passing argument 1 of '__pyx_f_4lxml_5etree_11TreeBuilder__handleSaxComment' from incompatible pointer type [enabled by default]
  
  src/lxml/lxml.etree.c:97566:18: note: expected 'struct __pyx_obj_4lxml_5etree_TreeBuilder *' but argument is of type 'struct __pyx_obj_4lxml_5etree__SaxParserTarget *'
  
  src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__xslt_resolve_from_python':
  
  src/lxml/lxml.etree.c:136086:9: warning: enumeration value '__pyx_e_4lxml_5etree_PARSER_DATA_INVALID' not handled in switch [-Wswitch]
  
  src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_4XSLT_18__call__':
  
  src/lxml/lxml.etree.c:140160:81: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
  
  src/lxml/lxml.etree.c:138095:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
  
  src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__copyXSLT':
  
  src/lxml/lxml.etree.c:141558:79: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
  
  src/lxml/lxml.etree.c:138095:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
  
  src/lxml/lxml.etree.c: At top level:
  
  src/lxml/lxml.etree.c:12770:13: warning: '__pyx_f_4lxml_5etree_displayNode' defined but not used [-Wunused-function]
  
  gcc: internal compiler error: Killed (program cc1)
  
  Please submit a full bug report,
  
  with preprocessed source if appropriate.
  
  See &lt;file:///usr/share/doc/gcc-4.6/README.Bugs&gt; for instructions.
  
  error: command 'gcc' failed with exit status 4
  
  ----------------------------------------
  </code></pre>