Try   HackMD

How to install DaVinci Resolve 19 on Ubuntu 24.04?

Explains the process to workaround the software compatibility problems of the DaVinci Resolve 19 application on a Ubuntu 24.04 system.

https://hackmd.io/@brlin/install-davinci-resolve-19-on-ubuntu-2404

#ubuntu #davinci-resolve #workaround #installation

Table of contents

Install required software dependencies

Running(GUI double click) the installer program of the DaVinci Resolve 19 application results in a "Missing or outdated system packages detected" error dialog:

Screenshot of the "Missing or outdated system packages detected" error dialog

When attempting to fix the error by install the instructed packages APT returns errors regarding the libasound2 package being a virtual package which doesn't really exist but can be provided by other packages:

$ sudo apt install libapr1 libaprutil1 libasound2 libglib2.0-0
[sudo] password for brlin: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libapr1t64' instead of 'libapr1'
Note, selecting 'libaprutil1t64' instead of 'libaprutil1'
Note, selecting 'libglib2.0-0t64' instead of 'libglib2.0-0'
Package libasound2 is a virtual package provided by:
  liboss4-salsa-asound2 4.2-build2020-1ubuntu3
  libasound2t64 1.2.11-1build2 (= 1.2.11-1build2)
You should explicitly select one to install.

As the liboss4-salsa-asound2 package appears to be related with the OSS sound system which is pretty much obsoleted and not used in modern Ubuntu, install the other package by running the following command as root in a text terminal:

apt install libasound2t64

Workaround the dependency detection bug of the product installer

Unfortunately, after installing the instructed packages the similar error dialog appears:

Screenshot of the "Missing or outdated system packages detected" error dialog

This seems to indicate that the product installer has a compatibility bug with Ubuntu 24.04 and cannot properly detect whether the dependencies are installed properly, fortunately there's a SKIP_PACKAGE_CHECK environment variable that can force the product installer to bypass that check.

In order to run the installer with the SKIP_PACKAGE_CHECK environment variable set to 1, we need to launch it in a text terminal:

cd /path/to/DaVinci_Resolve_19.0.1_Linux
sudo SKIP_PACKAGE_CHECK=1 ./DaVinci_Resolve_19.0.1_Linux.run -i

then follow the instructions in the text terminal to complete the installation.

Workaround the compatibility bug that prevents the product from launching

After installing it we can now launch the application by searching the "Davinci Resolve" icon in the launcher and click on itbut the application still didn't launch.

By searching in the standard desktop entry directories we can found the desktop entry file that launches the application is /usr/share/applications/com.blackmagicdesign.resolve.desktop, searching the Exec key:

$ grep -E '^Exec=' /usr/share/applications/com.blackmagicdesign.resolve.desktop
Exec=/opt/resolve/bin/resolve %u

reveals that the actual command to launch the application is /opt/resolve/bin/resolve.

Running the command in a text terminal reveals that the application failed to launch due to a library symbol lookup error during the dynamic linking process:

$ /opt/resolve/bin/resolve
/opt/resolve/bin/resolve: symbol lookup error: /lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: g_once_init_leave_pointer

This error message means that the g_once_init_leave_pointer function symbol required by the /lib/x86_64-linux-gnu/libpango-1.0.so.0 library file is not found in other libraries loaded by the /opt/resolve/bin/resolve program.

A search on the web will reveal that this function is defined in the glib library, by searching the glib keyword in the /opt/resolve/bin/resolve program's ldd output reveals that this library is vendored by the DaVinci Resolve 19 product(/opt/resolve/bin/../libs/libglib-2.0.so.0) instead of the system(/usr/lib/x86_64-linux-gnu/libglib-2.0.so):

$ ldd /opt/resolve/bin/resolve | grep glib
        libglib-2.0.so.0 => /opt/resolve/bin/../libs/libglib-2.0.so.0 (0x00007d9022800000)

Running the following command to search for the g_once_init_leave_pointer function symbol in the /opt/resolve/bin/../libs/libglib-2.0.so.0 vendored library:

nm_opts=(
    # Only display dynamic symbols
    --dynamic
    
    # Only display symbols that are defined in this library
    --defined
)
grep_opts=(
    # Output the count of the matched lines instead of the match
    # lines themselves
    --count
)
nm "${nm_opts[@]}" /opt/resolve/bin/../libs/libglib-2.0.so.0 \
    | grep "${grep_opts[@]}" g_once_init_leave_pointer

returns no result:

0

While running the same command against the /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 system library:

nm_opts=(
    # Only display dynamic symbols
    --dynamic
    
    # Only display symbols that are defined in this library
    --defined
)
grep_opts=(
    # Output the count of the matched lines instead of the match
    # lines themselves
    --count
)
nm "${nm_opts[@]}" /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 \
    | grep "${grep_opts[@]}" g_once_init_leave_pointer

does return a match:

1

This means that the pango library loaded from the system is not compatible with the glib library vendored by the DaVinci Resolve 19 product, which is a software compatibility bug of the DaVinci Resolve 19 product.

We can try to workaround this problem by disabling the incompatible vendored glib library to force the application to load the glib library from the system by running the following command as root in a text terminal:

sudo mv /opt/resolve/libs/libglib-2.0.so.0{,.disabled}

Rerun the application program reveals another symbol lookup error regarding the g_task_set_static_name symbol:

$ /opt/resolve/bin/resolve                                                                          
/opt/resolve/bin/resolve: symbol lookup error: /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0: undefined symbol: g_task_set_static_name

After another search on the web we can found that the symbol is provided by the Gio library, which again isn't provided by the vendored gio library:

$ ldd /opt/resolve/bin/resolve | grep gio     
        libgio-2.0.so.0 => /opt/resolve/bin/../libs/libgio-2.0.so.0 (0x00007b1c47c00000)
$ nm_opts=(
    # Only display dynamic symbols
    --dynamic
    
    # Only display symbols that are defined in this library
    --defined
)
grep_opts=(
    # Output the count of the matched lines instead of the match
    # lines themselves
    --count
)
nm "${nm_opts[@]}" /opt/resolve/bin/../libs/libgio-2.0.so.0 \
    | grep "${grep_opts[@]}" g_task_set_static_name
0
$ nm_opts=(
    # Only display dynamic symbols
    --dynamic
    
    # Only display symbols that are defined in this library
    --defined
)
grep_opts=(
    # Output the count of the matched lines instead of the match
    # lines themselves
    --count
)
nm "${nm_opts[@]}" /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 \
    | grep "${grep_opts[@]}" g_task_set_static_name
1

We again workaround this problem by disabling the problematic vendored library:

sudo mv /opt/resolve/libs/libgio-2.0.so.0{,.disabled}

Now running the application command reveals another symbol lookup error regarding the g_module_open_full symbol:

$ /opt/resolve/bin/resolve                    
/opt/resolve/bin/resolve: symbol lookup error: /lib/x86_64-linux-gnu/libgio-2.0.so.0: undefined symbol: g_module_open_full

After another search on the web we can found the symbol is provided by the GModule library, which again isn't provided by the vendored GModule library:

$ ldd /opt/resolve/bin/resolve | grep gmodule     
        libgmodule-2.0.so.0 => /opt/resolve/bin/../libs/libgmodule-2.0.so.0 (0x000075a3d4800000)
$ nm_opts=(
    # Only display dynamic symbols
    --dynamic
    
    # Only display symbols that are defined in this library
    --defined
)
grep_opts=(
    # Output the count of the matched lines instead of the match
    # lines themselves
    --count
)
nm "${nm_opts[@]}" /opt/resolve/bin/../libs/libgmodule-2.0.so.0 \
    | grep "${grep_opts[@]}" g_module_open_full
0
$ nm_opts=(
    # Only display dynamic symbols
    --dynamic
    
    # Only display symbols that are defined in this library
    --defined
)
grep_opts=(
    # Output the count of the matched lines instead of the match
    # lines themselves
    --count
)
nm "${nm_opts[@]}" /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 \
    | grep "${grep_opts[@]}" g_module_open_full
1

We again workaround this problem by disabling the problematic vendored library:

sudo mv /opt/resolve/bin/../libs/libgmodule-2.0.so.0{,.disabled}

Rerun the application command we can finally successfully launch the DaVinci Resolve 19 application:

Screenshot of the loading splash picture of DaVinci Resolve 19

References

The following are the external material referenced during the development of this write-up: