How To Install libanyevent-termkey-perl on Ubuntu 18.04

In this tutorial we learn how to install libanyevent-termkey-perl on Ubuntu 18.04. libanyevent-termkey-perl is module for terminal key input using libtermkey with AnyEvent

Introduction

In this tutorial we learn how to install libanyevent-termkey-perl on Ubuntu 18.04.

What is libanyevent-termkey-perl

libanyevent-termkey-perl is:

AnyEvent::TermKey implements an asynchronous perl wrapper around the libtermkey library, which provides an abstract way to read keypress events in terminal-based programs. It yields structures that describe keys, rather than simply returning raw bytes as read from the TTY device.

It internally uses an instance of Term::TermKey to access the underlying C library. For details on general operation, including the representation of keypress events as objects, see the documentation on that class.

Proxy methods exist for normal accessors of Term::TermKey, and the usual behaviour of the getkey or other methods is instead replaced by the on_key event.

There are three methods to install libanyevent-termkey-perl on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libanyevent-termkey-perl Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libanyevent-termkey-perl using apt-get by running the following command:

sudo apt-get -y install libanyevent-termkey-perl

Install libanyevent-termkey-perl Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libanyevent-termkey-perl using apt by running the following command:

sudo apt -y install libanyevent-termkey-perl

Install libanyevent-termkey-perl Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libanyevent-termkey-perl using aptitude by running the following command:

sudo aptitude -y install libanyevent-termkey-perl

How To Uninstall libanyevent-termkey-perl on Ubuntu 18.04

To uninstall only the libanyevent-termkey-perl package we can use the following command:

sudo apt-get remove libanyevent-termkey-perl

Uninstall libanyevent-termkey-perl And Its Dependencies

To uninstall libanyevent-termkey-perl and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libanyevent-termkey-perl

Remove libanyevent-termkey-perl Configurations and Data

To remove libanyevent-termkey-perl configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libanyevent-termkey-perl

Remove libanyevent-termkey-perl configuration, data, and all of its dependencies

We can use the following command to remove libanyevent-termkey-perl configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libanyevent-termkey-perl

References

Summary

In this tutorial we learn how to install libanyevent-termkey-perl package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.