LoginSignup
8
3

More than 5 years have passed since last update.

WSL上でbundle installしたらnokogiriが入らなかった

Last updated at Posted at 2018-01-18

環境

  • WSL(Windows subsystem for linux)
  • ubuntu
  • 入れたいnokogiri(1.8.1)

エラー

'libxml/xmlversion.h': No such file or directory

のエラーがでたが、libxml2はすでに導入済みで詰んだ。

最終的に入れてたパッケージ

  • libxslt-dev
  • build-essential
  • ruby-dev
  • zlib1g-dev
  • libxml2
  • libxml2-dev
  • liblzma-dev
  • libxmlsec1-dev(これの情報が無かった)

これらを入れて--use-system-librariesをしてbundle installしたらok。

コマンド

$ sudo apt install libxslt-dev build-essential ruby-dev zlib1g-dev liblzma-dev libxmlsec1-dev libxml2-dev
$ bundle config build.nokogiri --use-system-libraries
$ bundle install --path vendor/bundle --jobs=4
8
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
3