How To Install libcobra-java on Ubuntu 18.04
Introduction
In this tutorial we learn how to install libcobra-java on Ubuntu 18.04.
What is libcobra-java
libcobra-java is:
Cobra is a pure Java HTML renderer and DOM parser that is being developed to support HTML 4, Javascript and CSS 2.
Cobra can be used as a Javascript-aware and CSS-aware HTML DOM parser, independently of the Cobra rendering engine. Javascript DOM modifications that occur during parsing (e.g. via document.write) will be reflected in the parsed DOM, unless Javascript is disabled. Likewise, DOM element implementations have a getStyle method that can be called to obtain the styling properties of an element.
There are three methods to install libcobra-java 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 libcobra-java Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get update
After updating apt database, We can install libcobra-java using apt-get by running the following command:
sudo apt-get -y install libcobra-java
Install libcobra-java Using apt
Update apt database with apt using the following command.
sudo apt update
After updating apt database, We can install libcobra-java using apt by running the following command:
sudo apt -y install libcobra-java
Install libcobra-java 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 libcobra-java using aptitude by running the following command:
sudo aptitude -y install libcobra-java
How To Uninstall libcobra-java on Ubuntu 18.04
To uninstall only the libcobra-java package we can use the following command:
sudo apt-get remove libcobra-java
Uninstall libcobra-java And Its Dependencies
To uninstall libcobra-java and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove libcobra-java
Remove libcobra-java Configurations and Data
To remove libcobra-java configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge libcobra-java
Remove libcobra-java configuration, data, and all of its dependencies
We can use the following command to remove libcobra-java configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge libcobra-java
References
Summary
In this tutorial we learn how to install libcobra-java package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.