0

I am trying to install lxml using pip which gave me errors as libxml2 and libxslt were not installed. I tried installing them using yum. libxml2 was successfully installed but nothing happens when I give sudo yum install libxslt. The output is as follows

[root@motamarri Downloads]# yum install libxslt
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * rpmforge: archive.cs.uu.nl
 * webtatic: uk.repo.webtatic.com
Nothing to do

I am not sure what to do. Plz help. Thank you.

sandeep
  • 195
  • 1
  • 4
  • 14
  • 1
    What does `rpm -q libxslt` say? Are you perhaps missing the `libxslt-devel` package instead? – Etan Reisner Mar 09 '15 at 19:03
  • This is the output : libxslt-1.1.26-2.el6_3.1.x86_64 – sandeep Mar 09 '15 at 19:06
  • Like @EtanReisner points out, the `-devel` variants of those packages including the C header files are needed to build `lxml`. `yum install libxml2-devel libxslt-devel` should do the trick. – Lukas Graf Mar 09 '15 at 19:08
  • I get **No Package available** for libxslt-devel. – sandeep Mar 09 '15 at 19:10
  • What does `yum repolist` output? What does `yum search libxslt` output? – Etan Reisner Mar 09 '15 at 19:17
  • `Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * rpmforge: archive.cs.uu.nl * webtatic: uk.repo.webtatic.com =================================================================== N/S Matched: libxslt ==================================================================== perl-XML-LibXSLT.x86_64 : Interface to the gnome libxslt library libxslt.x86_64 : Library providing the Gnome XSLT engine python-lxml.x86_64 : ElementTree-like Python bindings for libxml2 and libxslt Name and summary matches only, use "search all" for everything. ` – sandeep Mar 09 '15 at 19:30
  • I had to manually download **libgcrypt-devel, libgcrypt-error-devel and libxslt-devel** and install them. Now lxml has been successfully installed. Thanks for all the help. Also if you can suggest why I could not install using yum, that would be really helpfull. – sandeep Mar 09 '15 at 19:36

1 Answers1

0

I downloaded libgpg-error-devel, libgpg-error-devel-1.7-4.el6.x86_64.rpm and libxslt-devel-1.1.26-2.el6_3.1.x86_64.rpm and installed using rpm -i. Then I installed lxml using pip. Just posting my work as it may be helpful for someone else. Thank you everyone

sandeep
  • 195
  • 1
  • 4
  • 14