run-mailcap command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
run-mailcap: command not found
or when using sudo you get the following error message
sudo: run-mailcap: command not found
Solutions to run-mailcap: command not found
How To Fix run-mailcap: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu run-mailcap is provided by mailcap package.
mailcap is:
The mailcap system associates media types with programs that can handle them, using system and user configuration files. A file’s media type is determined by its extension or by running the “file” command if available.
Other packages register their programs as viewers/editors/composers/etc by placing mailcap entry files or FreeDesktop menu entries in predetermined directories monitored by this package’s dpkg triggers.
This package provides a “run-mailcap” program to open arbitrary files, and in addition the “see”, “edit”, “compose”, and “print” aliases to display, alter, create, and print (respectively).
This package also provides the “debian-view” utility to handle Debian packages interactively.
To fix this problem, we can install more using the command below.
sudo apt-get -y install mailcap
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install mailcap.
sudo apt -y install mailcap
Or if you have aptitude installed you can use the following command.
sudo aptitude install mailcap
Summary
In this tutorial we learn how to fix run-mailcap command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.