How To Install Nokogiri On Debian, Ubuntu, Arch, Kali, Fedora And Raspbian?

How To Install Nokogiri On Debian, Ubuntu, Arch, Kali, Fedora And Raspbian?

nokogiri

An HTML, XML, SAX and Reader parser.

Install nokogiri

  • Debian apt-get install rubygem-nokogiri Click to copy
  • Ubuntu apt-get install rubygem-nokogiri Click to copy
  • Arch Linux pacman -S rubygem-nokogiri Click to copy
  • Kali Linux apt-get install rubygem-nokogiri Click to copy
  • Fedora dnf install rubygem-nokogiri Click to copy
  • Raspbian apt-get install rubygem-nokogiri Click to copy

An HTML, XML, SAX and Reader parser.

How to use nokogiri?

Below are few example commands for nokogiri that you can use in the terminal.

Parse the contents of a url or file:
nokogiri url|path/to/fileClick to copy
Parse as a specific type:
nokogiri url|path/to/file --type xml|htmlClick to copy
Load a specific initialisation file before parsing:
nokogiri url|path/to/file -C path/to/config_fileClick to copy
Parse using a specific encoding:
nokogiri url|path/to/file --encoding encodingClick to copy
Validate using a RELAX NG file:
nokogiri url|path/to/file --rng url|path/to/fileClick to copy
Installing nokogiri command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Arch, Kali, Fedora and Raspbian operating systems. Once you run the command it will install the latest version of nokogiri 2024 package in your OS.