package command not found

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

Introduction

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

package: command not found

or when using sudo you get the following error message

sudo: package: command not found

Solutions to package: command not found

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

In Ubuntu package is provided by mailagent package.

mailagent is:

Mailagent is a mail delivery agent, and can be programmed to respond to mail in ways more sophisticated than a mail filtering program like procmail. It is easy to configure, and very easy to extend using Perl. Not only can the base functionality be extended, new commands and processing methods can be added in a modular fashion.

Obeying lex-like rulesets, mailagent can file mails to specific folders (plain Unix-style folders and also MMDF and MH ones), forward messages to third parties, pipe them to commands or post them to newsgroups. The filtering commands that are executed on the messages can be extended, and may rewrite the message headers or body as desired. It can also create and process commands based on key words contained in the body of the mail message.

Mailagent can be used as a vacation program, and can answer mail automatically and with more flexibility than the command of that name. A template can be provided for the body of the response, and the frequency of vacation mails can also be specified. Simple macro substitutions allow parts of the mail header to be recycled into the vacation messages, for a more personalized reply.

Mailagent can also be used to set up a generic mail server, without the hassle of the lower-level concerns like error recovery, logging or command parsing.

Please note that on Debian systems, mailagent requires a catch-all rule saving all mail into the user’s home directory. Unlike other Mail Delivery Agents such as procmail, mailagent is too extensible to be safely made setgid mail, and so cannot lock /var/spool/mail mailboxes.

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

sudo apt-get -y install mailagent

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

You can also use apt command to install mailagent.

sudo apt -y install mailagent

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

sudo aptitude install mailagent

Summary

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