I'm new to (K)ubuntu. Does anybody know how to install the gphoto2 software?
Ubuntu – How to install Gphoto2
gphoto2kubuntuphotophotography
gphoto2kubuntuphotophotography
I'm new to (K)ubuntu. Does anybody know how to install the gphoto2 software?
Best Answer
Wow, how is the documentation for this so terrible? At the time of writing, the documentation on the official site literally says:
Here's how I installed it (on Ubuntu 18.04 LTS) after lots of trial and error. Keep in mind that
gphoto2
is simply the CLI forlibgphoto2
. Simply installinggphoto2
won't do much for you.Easy method
Use
apt
(orapt-get
)You may be wondering why it's
libgphoto2-6
and not justlibgphoto2
. When you're typingsudo apt install libgphoto2
presstab
and see what it completes. You can also view what the latest packages are for each ubuntu build. Launchpad and packages.ubuntu.com.After that you should be able to use gphoto2 in Terminal.
should show you something meaningful.
Advanced build
If you go to the gphoto2 website, you'll notice that they've released updates to
libgphoto2
since Ubuntu 18.04's latest package (2.5.16). Specifically, I want to have support for Sony Alpha A9, which requireslibgphoto2 v2.5.22
. You can download it from the source, but now what?cd
to the tar.bz2 file.unzip it: autocomplete the file name by pressing
tab
configure, make, make install Go into the directory. Each of these commands will take time, so enter one line at a time.
If at any point it says it looks like something went wrong, it's likely you're missing a package. I had to install:
libtool
,libpopt-dev
,libsub-dev
,libexif-dev
,libjpeg-dev
,autoconf
,autopoint
,libcdk5-dev
The github repo has an additional step of
which for me, required
apt install
ing theautoconf
andautopoint
packages.This updates
libgphoto2
. To updategphoto2
, which I needed to do in order to use libgphoto2-2.5.22, you have to go through the same steps. Read the README.md. I had to installlibpopt-dev
. Running./configure
alerted me to this problem.You may need to restart Terminal or your machine to see changes.
After that, check your version using
gphoto2 -v
.