Is your gphoto2 installed in a user-writeable directory? I see no reason why darktable would modify other executables, though.
Or is its config updated (damaged) when you use darktable? If yes, you should track down where that config is, and what modification creates the problem, then report an issue so it can be fixed.
And just to double-check: you don’t run darktable as root, right?