How To Install libgphoto2-dev on Ubuntu 20.04

In this tutorial we learn how to install libgphoto2-dev on Ubuntu 20.04. libgphoto2-dev is gphoto2 digital camera library (development files) gphoto2 digital camera library (development files)

Introduction

In this tutorial we learn how to install libgphoto2-dev on Ubuntu 20.04.

What is libgphoto2-dev

libgphoto2-dev is:

The gphoto2 library can be used by applications to access various digital camera models, via standard protocols such as USB Mass Storage and PTP, or vendor-specific protocols.

This package contains the development files.

Package: libgphoto2-dev Architecture: amd64 Version: 2.5.24-1 Multi-Arch: same Priority: optional Section: libdevel Source: libgphoto2 Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian PhotoTools Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 3367 Depends: libexif-dev, libgphoto2-6 (= 2.5.24-1), pkg-config Breaks: libgphoto2-2-dev (« 2.5.2-1~) Replaces: libgphoto2-2-dev (« 2.5.2-1~) Filename: pool/main/libg/libgphoto2/libgphoto2-dev_2.5.24-1_amd64.deb Size: 615548 MD5sum: d771c2f90d7da2af68a3dd1f784f45cc SHA1: 67c6418754295d03785b474342d2d0bb0c936eaf SHA256: 0d35913059c565f3289a5f77c774926cf1fd63219410e8f2a542e574b6a956ef Homepage: https://github.com/gphoto/libgphoto2/ Description-en: gphoto2 digital camera library (development files) The gphoto2 library can be used by applications to access various digital camera models, via standard protocols such as USB Mass Storage and PTP, or vendor-specific protocols.

This package contains the development files.

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

sudo apt-get -y install libgphoto2-dev

Install libgphoto2-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libgphoto2-dev

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

sudo aptitude -y install libgphoto2-dev

How To Uninstall libgphoto2-dev on Ubuntu 20.04

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

sudo apt-get remove libgphoto2-dev

Uninstall libgphoto2-dev And Its Dependencies

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

sudo apt-get -y autoremove libgphoto2-dev

Remove libgphoto2-dev Configurations and Data

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

sudo apt-get -y purge libgphoto2-dev

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

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

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

References

Summary

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