The export PDF feature relies on SlimerJS, which on Ubuntu has a dependency on the lib xvfb.
You haven't installed such lib, that's why you face that error. Actually this configuration in missing on the available online documentation, so we are sorry about that.
To configure the export feature properly, please install the libs [1] and the package xvfb [2], as per SlimerJS documentation:
On Linux, standalone editions need these libraries: libpthread.so, libdl.so, libstdc++.so, libm.so, libgcc_s.so, libc.so, ld-linux-x86-64.so, libXrender1.so, libasound.so.2, libgtk-x11-2.0.so.0. On Ubuntu/Debian, you can install/verify it by doing:
sudo apt-get install libc6 libstdc++6 libgcc1 libgtk2.0-0 libasound2 libxrender1
There is a tool called xvfb, available on Linux and MacOS. It allows to launch any “graphical” programs without the need of an X-Windows environment. Windows of the application won’t be shown and will be drawn only in memory.
Install it from your prefered repository (e.g. with Ubuntu/Debian):
sudo apt-get install xvfb
[1] https://docs.slimerjs.org/0.9/installation.html#requirements
[2] https://docs.slimerjs.org/0.9/installation.html#having-a-headless-slimerjs