img2pdf command not found

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

Introduction

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

img2pdf: command not found

or when using sudo you get the following error message

sudo: img2pdf: command not found

Solutions to img2pdf: command not found

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

In Ubuntu img2pdf is provided by img2pdf package.

img2pdf is:

This program will take a list of raster images and produce a PDF file with the images embedded in it. JPEG and JPEG2000 images will be included without recompression. Raster images in other formats will be included with zip/flate encoding which usually leads to an increase in the resulting size because formats like png compress better than PDF which just zip/flate compresses the RGB data. As a result, this tool is able to losslessly wrap images into a PDF container with a quality to filesize ratio that is typically better (in case of JPEG and JPEG2000 images) or equal (in case of other formats) than that of existing tools.

This package contains the executable.

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

sudo apt-get -y install img2pdf

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

You can also use apt command to install img2pdf.

sudo apt -y install img2pdf

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

sudo aptitude install img2pdf

Summary

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