gem2tgz command not found

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

Introduction

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

gem2tgz: command not found

or when using sudo you get the following error message

sudo: gem2tgz: command not found

Solutions to gem2tgz: command not found

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

In Ubuntu gem2tgz is provided by gem2deb package.

gem2deb is:

gem2deb is a set of tools to create Debian package from ruby software distributed with Rubygems. gem2tgz converts the .gem file to a tar archive, then dh-make-ruby creates a Debian source package from that archive. That Debian package uses the included Debhelper helper, dh_ruby, to generate a proper Debian package. Both pure-ruby and native packages are supported.

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

sudo apt-get -y install gem2deb

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

You can also use apt command to install gem2deb.

sudo apt -y install gem2deb

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

sudo aptitude install gem2deb

Summary

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