Build and install darktable on Linux with one command

Hi all,

I wrote a script that builds and installs the latest darktable release from source with a single command:


curl -fsSL https://raw.githubusercontent.com/andriiryzhkov/darktable/refs/heads/install_tools/tools/install_release.sh | bash

That’s all. It installs the build dependencies, fetches the release, compiles it and installs it, asking before it changes anything on your system. AI features are included, as in the official builds. If their dependencies aren’t available on your system, it builds without them and tells you, rather than failing.

What you get:

  • a build compiled for your own CPU (-march=native) rather than the generic one in the official packages

  • its own folder (/opt/darktable, or under your home with --user, no root needed), kept apart from your distribution’s packages

  • an easy way back: --uninstall removes it, and your settings and library are never touched

Options go after bash -s --, for example | bash -s -- --user, or --disable-ai to leave AI out. --help shows them all.

It installs dependencies automatically on Debian/Ubuntu (the same list darktable’s CI uses), with a best-effort list for Fedora. The script is here: install_release.sh

Would this be useful to anyone else? If there’s interest I could propose it to darktable as a PR. Otherwise I made it for myself, but I’m happy to share it. Feedback is welcome, especially from Fedora users, since that package list isn’t tested in CI.

14 Likes

Potentially missing (explicitly?) for Fedora: Imath-devel glib2-devel iso-codes-devel libicu-devel libjxl-devel.

libomp-devel can be removed (belongs to the LLVM toolchain, while GCC is used for the build).

1 Like

I’m definitely very interested in that.

1 Like

Let’s not do that because then darktable would have to support it and we already have more than enough issues without opening up building to a whole new group of people.

Leave it as something you’re sharing and you can provide the level of support that you want (use at your own risk is a good one :smile: ).

1 Like

Sure, anyway it was primarily for personal use. Anybody interested in it is welcome to use as is.

3 Likes

Many thanks for this. It overcomes the problem of locating all of the dependencies. It executed perfectly on my Linux Mint system.

1 Like

It’s a masterpiece of a shellscript. I used to use shell in earning my living long ago, but nothing so complex. Salutations :smiley:

How would I use this for the master branch, and would it have advantages over the relatively simple git commands?

1 Like

It does not work with development versions from the master branch. Only stable releases.

1 Like