Darktable doesn't recognize Git in my path and won't install Lua scripts

I’m trying to set up Lua scripts, with the Lua Script Installer dropdown in Darktable, and keep running into the same message in the UI – “Please install git and make sure it is in your path.”

I’m on Ubuntu 20.04.5 LTS.

I’ve installed Git on my machine and have been using it to update repos without issue. I’m running version 2.25.1.

The path to Git, typing the ‘which git’ command, is ‘/usr/bin/git’.

I added a .bash_profile for my user and added the explicit path to git, even though the existing path points to /usr/bin. (export PATH="/usr/bin/git:$PATH")

I saved it with ‘source ~/.bash_profile,’ as well as added that command to my .bashrc so it updates the path on every startup.

The resulting $PATH is ‘/usr/bin/git:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin’.

I’ve restarted and reinstalled, and still Darktable doesn’t recognize Git.

Anybody else have this issue?

Hi @jblackz69, and welcome!

Please execute this command from a terminal:

darktable --version

and show us the response.

Also, show the reply to

which lua

and

lua -v

Have fun!
Claes in Lund, Sweden

Hi, Claes. Darktable is at version 4.0.1 and Lua is 5.1.5 ( /usr/bin/lua).

Please execute this command from a terminal:

darktable --version

and show us the response. It is more than the version number I am after.

I see. Here’s the info:

this is darktable 4.0.1
copyright (c) 2009-2022 johannes hanika
darktable-dev@lists.darktable.org

compile options:
bit depth is 64 bit
normal build
SSE2 optimized codepath enabled
OpenMP support enabled
OpenCL support enabled
Lua support enabled, API version 8.0.0
Colord support disabled
gPhoto2 support enabled
GraphicsMagick support enabled
ImageMagick support disabled
OpenEXR support enabled

I should note that I just installed Darktable on my Mac and did the Lua scripts installation without issue.

Thank you.

Next step.
Start darktable from a terminal in lua debug mode, i.e.

darktable -d lua

Try installation of scripts, then close darktable.
What debug messages did it produce?

I deleted the database lock and ran ‘darktable -d lua’ again. Then, tried to execute the install scripts from the GUI. Here’s the resulting console message:

(darktable:6676): GLib-GIO-WARNING **: 08:24:30.447: Error creating IO channel for /proc/self/mountinfo: Permission denied (g-file-error-quark, 2)
[lib_load_module] failed to open `gamepad’: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
10.254318 LUA ERROR : cannot open /home/jblack/snap/darktable/85/luarc: No such file or directory

Aha!
Did you install darktable as a snap?
Is the installation on your Mac (which works) also a snap?

I installed Darktable from the software manager in Ubuntu. Not sure how that worked. There’s no snap directory on the Mac.

I am out of brilliant ideas,
so let’s try to alert Those Who Know More:
ping @wpferguson

Thanks for checking it out, Claes.

1 Like

As the snap package is highly containerized, it can cause the problems you’re seeing as the program by default can’t access anything outside its container.

The software manager GUI on normal Ubuntu can install both from apt repos and snap apps. I would guess the version on the official repos is lower and Ubuntu is installing the snap by default.

There should be an option to force the installation of one or the other, but it’s been a while since I’ve used vanilla Ubuntu so I can’t tell you how. In any case, if the version on Ubuntu repos is too old you may be better served by the OBS repository.

1 Like

Yes this is the snap version. As mentioned already, snaps are sandboxed and you can not alter the sandbox permissions.

You can use the flatpak, maybe a PPA, or upgrade Ubuntu to get a newer version.

You might also open a bug against the snap package.

2 Likes