cronosplit command not found

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

Introduction

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

cronosplit: command not found

or when using sudo you get the following error message

sudo: cronosplit: command not found

Solutions to cronosplit: command not found

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

In Ubuntu cronosplit is provided by cronolog package.

cronolog is:

A simple program that reads log messages from its input and writes them to a set of output files, the names of which are constructed using template and the current date and time. The template uses the same format specifiers as the Unix date command (which are the same as the standard C strftime library function).

It intended to be used in conjunction with a Web server, such as Apache, to split the access log into daily or monthly logs:

TransferLog “|/usr/bin/cronolog /var/log/apache/%Y/access.%Y.%m.%d.log”

A cronosplit script is also included, to convert existing traditionally-rotated logs into this rotation format.

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

sudo apt-get -y install cronolog

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

You can also use apt command to install cronolog.

sudo apt -y install cronolog

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

sudo aptitude install cronolog

Summary

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