How To Install libtntnet-dev on Ubuntu 18.04

In this tutorial we learn how to install libtntnet-dev on Ubuntu 18.04. libtntnet-dev is Tntnet library development headers

Introduction

In this tutorial we learn how to install libtntnet-dev on Ubuntu 18.04.

What is libtntnet-dev

libtntnet-dev is:

Tntnet has a template-language called ecpp similar to PHP, JSP or Mason, where you can embed c++ code inside a HTML page to generate active content. The ecpp files are precompiled to C++ classes called components and compiled and linked into a shared library. This process is done at compiletime. The web server Tntnet needs only the compiled component library.

Because the web applications are compiled into native code, they are very fast and compact.

Components can call other components. So you can create building blocks of HTML parts and call them in other pages like subprocesses.

Requests are parsed by tntnet and the request information is easily accessible to the components. It supports GET and POST parameters and MIME multipart requests for file upload.

The template language has also support for internationalized applications. You can easily create web applications for different languages.

Other features are: cookies, HTTP upload, automatic request parameter parsing and conversion, automatic session management, scoped variables (application, request and session), internationalisation and keep-alive.

Logging is done through cxxtools, which provides a unique API for log4cpp, log4cxx or simple logging to files or console.

Tntnet is fully multithreaded and much work has been gone into making it scalable. It uses a dynamic pool of worker threads, which answer requests from HTTP clients.

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

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

sudo apt-get update

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

sudo apt-get -y install libtntnet-dev

Install libtntnet-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libtntnet-dev

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

sudo aptitude -y install libtntnet-dev

How To Uninstall libtntnet-dev on Ubuntu 18.04

To uninstall only the libtntnet-dev package we can use the following command:

sudo apt-get remove libtntnet-dev

Uninstall libtntnet-dev And Its Dependencies

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

sudo apt-get -y autoremove libtntnet-dev

Remove libtntnet-dev Configurations and Data

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

sudo apt-get -y purge libtntnet-dev

Remove libtntnet-dev configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libtntnet-dev

References

Summary

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