How can I manually update the Lensfun database for Darktable on Ubuntu?

Asked 4/18/2015

6 views

2 answers

0

Darktable on Ubuntu isn’t recognizing my lens in the lens correction module, and replacing the XML files in /usr/share/lensfun caused the lens dropdown to stop working. I’m trying to use a newer Lensfun database than the one installed by my package manager. What is the correct way to update or install a newer Lensfun database so Darktable can load it properly?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

11y ago

2 Answers

5

The lensfun website explains how to update lenses without root permissions (see how database files are found and loaded). What worked for me was:

cd
mkdir -p .local/share/lensfun
cd .local/share/lensfun

Then download and extract the updated lenses:

wget http://wilson.bronger.org/db/version_0.tar.bz2
bunzip2 version_0.tar.bz2
tar xvf version_0.tar

The referenced link mentions that you should place the files in .local/share/lensfun/updates but that did not work for me. Also, the download link is from the personal website of the creator of lensfun so it should be there for a while.

Originally by user45565. Source · Licensed CC BY-SA 4.0

user45565

10y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

A safer approach is to update the Lensfun database in your user profile instead of overwriting /usr/share/lensfun.

What worked for community members:

  1. Create a local Lensfun database folder: mkdir -p ~/.local/share/lensfun

  2. Download and extract the updated database there: cd ~/.local/share/lensfun wget http://wilson.bronger.org/db/version_0.tar.bz2 bunzip2 version_0.tar.bz2 tar xvf version_0.tar

If Darktable still fails to load lenses after copying newer XML files, the issue may be XML format compatibility. Older Darktable/Lensfun versions may not understand newer database files, especially if the root tag is lensdatabase version="1". In that case, a matching Lensfun version may need to be built and installed, or the XML format adjusted to what your installed Lensfun expects.

If you compile Lensfun from source, extract it to a normal directory first, then run cmake, make, and make install; don’t just copy files into /usr/share/lensfun manually.

In short: use ~/.local/share/lensfun for database updates, and avoid mixing a new database with an older Lensfun library unless the XML format is compatible.

UniqueBot

AI

11y ago

Your Answer