How To Install libsearch-queryparser-perl on Ubuntu 18.04

In this tutorial we learn how to install libsearch-queryparser-perl on Ubuntu 18.04. libsearch-queryparser-perl is Perl module to parse URI query strings into a data structure

Introduction

In this tutorial we learn how to install libsearch-queryparser-perl on Ubuntu 18.04.

What is libsearch-queryparser-perl

libsearch-queryparser-perl is:

Search::QueryParser parses URI query strings into a data structure to be handled by external search engines.

The query string can contain simple terms, “exact phrases”, field names and comparison operators, ‘+/-’ prefixes, parentheses, and boolean connectors.

The parser can be parameterized by regular expressions for specific notions of “term”, “field name” or “operator” ; see the new method. The parser has no support for lemmatization or other term transformations : these should be done externally, before passing the query data structure to the search engine.

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

sudo apt-get -y install libsearch-queryparser-perl

Install libsearch-queryparser-perl Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libsearch-queryparser-perl

Install libsearch-queryparser-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 libsearch-queryparser-perl using aptitude by running the following command:

sudo aptitude -y install libsearch-queryparser-perl

How To Uninstall libsearch-queryparser-perl on Ubuntu 18.04

To uninstall only the libsearch-queryparser-perl package we can use the following command:

sudo apt-get remove libsearch-queryparser-perl

Uninstall libsearch-queryparser-perl And Its Dependencies

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

sudo apt-get -y autoremove libsearch-queryparser-perl

Remove libsearch-queryparser-perl Configurations and Data

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

sudo apt-get -y purge libsearch-queryparser-perl

Remove libsearch-queryparser-perl configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libsearch-queryparser-perl

References

Summary

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