imgsize command not found

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

Introduction

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

imgsize: command not found

or when using sudo you get the following error message

sudo: imgsize: command not found

Solutions to imgsize: command not found

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

In Ubuntu imgsize is provided by libimage-size-perl package.

libimage-size-perl is:

Image::Size is a Perl module capable of determining image sizes from several common formats. It handles XPM, XBM, GIF, JPEG, PNG, MNG, the PPM family of formats (PPM/PGM/PBM), TIFF, FlashMX (Shockwave Flash version 6), WMF/EMF, and more.

It supports additional file types through Image::Magick, and the included “imgsize” script provides access to Image::Size from the shell.

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

sudo apt-get -y install libimage-size-perl

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

You can also use apt command to install libimage-size-perl.

sudo apt -y install libimage-size-perl

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

sudo aptitude install libimage-size-perl

Summary

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