solve libxslt is missing error when installing omniauth or nokogiri

I was trying to install omniauth and was getting error for nokogiri libxslt is missing. If you are facing the same issue you may solve it using the following command. I have tested it with ubuntu and it worked for me. Its not tested on Fedora but should work.

on Ubuntu 10

sudo apt-get install libxml2 libxml2-dev libxslt libxslt-dev

on Ubuntu 11

sudo apt-get install libxml2 libxml2-dev libxslt1-dev

On fedora

sudo yum install libxml2-devel libxslt-devel

If you still face issues do write to me.


Be Sociable, Share!


  • Sierra

    I am having the same problem but on Mac OS Lion. I am using ruby 1.9.2, Xcode 4, homebrew, and RVM. Do you know how to solve this problem on Mac OS?

  • Hi

    Thanks for the comment. Haven’t tested it but on googling I found this

    sudo port install libxml2 libxslt

    Try it out and let me know if you still face any issue.


  • Andrew Gee


    I’ve tried the above command in Ubuntu:

    sudo apt-get install libxml2 libxml2-dev libxslt libxslt-dev

    I get the following error:

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Note, selecting ‘libxslt1-dev’ instead of ‘libxslt-dev’
    E: Unable to locate package libxslt

  • Andrew,

    You may try running the following 2 commands and than try installing it again. via apt-get update or aptitude install build-essential

    If it still doesn’t work let me know


  • Flatrocks

    Thanks – the proposed solution worked for us.

    Deploying via capistrano to a Rackspace cloud server, amd64 architecture, running REE and Rails 3.1.

  • Hi Andrew

    I think i missed the point. you are using >11 version of Ubuntu and thus you will have to run the following command. I will update in my post too.

    sudo apt-get install libxml2 libxml2-dev libxslt1-dev


Leave a Reply

Your email address will not be published. Required fields are marked *