How To Install libtcnative-1 on Ubuntu 18.04

In this tutorial we learn how to install libtcnative-1 on Ubuntu 18.04. libtcnative-1 is Tomcat native library using the Apache Portable Runtime

Introduction

In this tutorial we learn how to install libtcnative-1 on Ubuntu 18.04.

What is libtcnative-1

libtcnative-1 is:

Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. The Apache Portable Runtime is a highly portable library that is at the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number generation, system status, etc), and native process handling (shared memory, NT pipes and Unix sockets).

These features allows making Tomcat a general purpose webserver, will enable much better integration with other native web technologies, and overall make Java much more viable as a full fledged webserver platform rather than simply a backend focused technology.

There are three methods to install libtcnative-1 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 libtcnative-1 Using apt-get

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

sudo apt-get update

After updating apt database, We can install libtcnative-1 using apt-get by running the following command:

sudo apt-get -y install libtcnative-1

Install libtcnative-1 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libtcnative-1 using apt by running the following command:

sudo apt -y install libtcnative-1

Install libtcnative-1 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 libtcnative-1 using aptitude by running the following command:

sudo aptitude -y install libtcnative-1

How To Uninstall libtcnative-1 on Ubuntu 18.04

To uninstall only the libtcnative-1 package we can use the following command:

sudo apt-get remove libtcnative-1

Uninstall libtcnative-1 And Its Dependencies

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

sudo apt-get -y autoremove libtcnative-1

Remove libtcnative-1 Configurations and Data

To remove libtcnative-1 configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libtcnative-1

Remove libtcnative-1 configuration, data, and all of its dependencies

We can use the following command to remove libtcnative-1 configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libtcnative-1

References

Summary

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