How To Install libcgic-dev on Ubuntu 18.04

In this tutorial we learn how to install libcgic-dev on Ubuntu 18.04. libcgic-dev is C library for developing CGI applications

Introduction

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

What is libcgic-dev

libcgic-dev is:

Cgic is an ANSI-C library for the creation of CGI-based World Wide Web applications. Cgic provides the following:

  • Parses form data, correcting for defective and/or inconsistent browsers
  • Transparently accepts both GET and POST form data
  • Handles line breaks in form fields in a consistent manner
  • Provides string, integer, floating-point, and single- and multiple-choice functions to retrieve form data
  • Provides bounds checking for numeric fields
  • Loads CGI environment variables into C strings which are always non-null
  • Provides a way to capture CGI situations for replay in a debugging environment

This package provides a static library version of cgic, examples of using cgic (including a CGI application that captures a CGI environment for use in debugging), and header files.

There are three methods to install libcgic-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 libcgic-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 libcgic-dev using apt-get by running the following command:

sudo apt-get -y install libcgic-dev

Install libcgic-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libcgic-dev

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

sudo aptitude -y install libcgic-dev

How To Uninstall libcgic-dev on Ubuntu 18.04

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

sudo apt-get remove libcgic-dev

Uninstall libcgic-dev And Its Dependencies

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

sudo apt-get -y autoremove libcgic-dev

Remove libcgic-dev Configurations and Data

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

sudo apt-get -y purge libcgic-dev

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

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

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

References

Summary

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