html2xhtml command not found

In this troubleshooting guide we learn how to fix html2xhtml command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

html2xhtml: command not found

or when using sudo you get the following error message

sudo: html2xhtml: command not found

Solutions to html2xhtml: command not found

How To Fix html2xhtml: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu html2xhtml is provided by libhtml-html5-parser-perl package.

libhtml-html5-parser-perl is:

HTML::HTML5::Parser is an HTML parser, similar to the non-CPAN module Whatpm::HTML with some changes including:

  • Provides an XML::LibXML-like DOM interface. If you usually use XML::LibXML’s DOM parser, this should be a drop-in solution for tag soup HTML.

  • Constructs an XML::LibXML::Document as the result of parsing.

  • Via bundling and modifications, removed external dependencies on non-CPAN packages.

To fix this problem, we can install more using the command below.

sudo apt-get -y install libhtml-html5-parser-perl

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install libhtml-html5-parser-perl.

sudo apt -y install libhtml-html5-parser-perl

Or if you have aptitude installed you can use the following command.

sudo aptitude install libhtml-html5-parser-perl

Summary

In this tutorial we learn how to fix html2xhtml command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.