# 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
[TOC]
## 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](https://hackmd.io/_uploads/BJMjK6630.png "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:
```txt!
$ 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:
```bash
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](https://hackmd.io/_uploads/BJMjK6630.png "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:
```bash
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 it...but 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:
```txt
$ 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:
```txt
$ /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](https://docs.gtk.org/glib/type_func.Once.init_leave_pointer.html), 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):
```txt
$ 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:
```bash
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:
```txt
0
```
While running the same command against the `/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0` system library:
```bash
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:
```txt
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:
```bash
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:
```txt
$ /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](https://docs.gtk.org/gio/method.Task.set_static_name.html), which again isn't provided by the vendored gio library:
```txt
$ ldd /opt/resolve/bin/resolve | grep gio
libgio-2.0.so.0 => /opt/resolve/bin/../libs/libgio-2.0.so.0 (0x00007b1c47c00000)
```
```txt
$ 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
```
```txt
$ 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:
```bash
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:
```txt!
$ /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](https://docs.gtk.org/gmodule/type_func.Module.open_full.html), which again isn't provided by the vendored GModule library:
```txt
$ ldd /opt/resolve/bin/resolve | grep gmodule
libgmodule-2.0.so.0 => /opt/resolve/bin/../libs/libgmodule-2.0.so.0 (0x000075a3d4800000)
```
```txt
$ 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
```
```txt
$ 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:
```bash
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](https://hackmd.io/_uploads/r1Tp2063C.png)
## References
The following are the external material referenced during the development of this write-up:
* [Blackmagic Forum • View topic - Missing Packages on Linux install -](https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=200276&p=1078792&hilit=24.04+Ubuntu#p1047334)
A forum topic on the official forum that has the same problem, gives clue of using the `SKIP_PACKAGE_CHECK` environment variable to bypass the installer's software dependency check logic.
* [The Exec key | Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/exec-variables.html)
Explaiuns the usage of the `%u` field code expansion symtax.
* [GLib.Once.init_leave_pointer](https://docs.gtk.org/glib/type_func.Once.init_leave_pointer.html)
Provide clue on where the `g_once_init_leave_pointer` function is defined.
* The `nm(1)` manual page
Explains the usage of the `--dynamic` and `--defined` command options.
* The `grep(1)` manual page
Explains the usage of the `--count` command option.