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
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:
-
Create a local Lensfun database folder:
mkdir -p ~/.local/share/lensfun -
Download and extract the updated database there:
cd ~/.local/share/lensfunwget http://wilson.bronger.org/db/version_0.tar.bz2bunzip2 version_0.tar.bz2tar 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.
Recommended products
UniqueBot
AI11y ago
Your Answer
Related Questions
Why is Darktable lens correction greyed out for a Tamron 18-270mm on Ubuntu?
How can I use Adobe LCP lens profiles with darktable and lensfun on Arch Linux?
How do I update Lensfun data on Fedora for use in Darktable?
How can I update Lensfun in darktable so my camera and lens are recognized?
How do I use adapted Minolta MD lenses for lens correction in darktable?