Recently, I have upgraded to Ubuntu 18.04 LTS and OpenPHT stopped working due to library incompatibilities. I did not have much time initially, so I used OpenPHT .AppImage from here:
However, the .AppImage version had issues with the hardware acceleration on my Intel NUC.
I was getting an error in the log:  ERROR: VAAPI::CheckSuccess error: unknown libva error
Today, I had some time and was able to build OpenPHT 1.9 on Ubuntu 18.04 and it works fine.
Few years back when I first created the procedure to build OpenPHT on Ubuntu (Building OpenPHT from source on Ubuntu 14.04 ¡ RasPlex/OpenPHT Wiki ¡ GitHub), user blindy created a helpful openpht-install script using the steps to automate the process.
The instructions and script can be downloaded from here:
Ubuntu script to install OpenPHT
However blindy has not updated his script for Ubuntu Bionic yet. You can either use his script with the modifications below or use my original procedure from the wiki and add the following steps to fix the compilation errors:
I have added the following lines to the downloaded opehpht-install script right after cloning the OpenPHT repository âgit pullâ line :
if (( $(echo â$(lsb_release -r -s) 18.04â | awk â{print ($1 <= $2)}â) )); then
wget https://github.com/RasPlex/Dockerfiles/raw/master/patches/plexht-0001-cec-update-to-libcec-4.patch
wget https://github.com/RasPlex/Dockerfiles/raw/master/patches/plexht-0002-websocketpp-openssl.patch
patch -p1 < plexht-0001-cec-update-to-libcec-4.patch # libcec>=4
patch -p1 < plexht-0002-websocketpp-openssl.patch # openssl>=1.1
fi
Also, I have updated the lines building the plexhometheater.sh executable file. Check /opt/openpht/bin/openpht to see the original executable. Some paths have changed.
In the openpht-install script after âmake cleanâ line change the lines with:
sudo sh -c âecho #!/bin/sh > ${LOADERSCRIPTDIR}/plexhometheater.shâ
sudo sh -c âecho #sleep 30 >> ${LOADERSCRIPTDIR}/plexhometheater.shâ
sudo sh -c âecho export XBMC_HOME=${OPENPHTINSTALLDIR}/share/openpht >> ${LOADERSCRIPTDIR}/plexhometheater.shâ
sudo sh -c âecho export LD_LIBRARY_PATH=${OPENPHTINSTALLDIR}/lib/openpht/system/players/dvdplayer >> ${LOADERSCRIPTDIR}/plexhometheater.shâ
sudo sh -c âecho #pactl suspend-sink 1 1 >> ${LOADERSCRIPTDIR}/plexhometheater.shâ
sudo sh -c âecho #export AE_SINK=ALSA >> ${LOADERSCRIPTDIR}/plexhometheater.shâ
sudo sh -c âecho ${OPENPHTINSTALLDIR}/lib/openpht/plexhometheater >> ${LOADERSCRIPTDIR}/plexhometheater.shâ
sudo sh -c âecho #pactl suspend-sink 1 0 >> ${LOADERSCRIPTDIR}/plexhometheater.shâ
sudo chmod +x ${LOADERSCRIPTDIR}/plexhometheater.sh
sudo chown $USER:$USER ${LOADERSCRIPTDIR}/plexhometheater.shecho ${LOADERSCRIPTDIR}/plexhometheater.sh to run OpenPHT
I use the following lines to autostart openpht after reboot in ~/.config/autostart/plex.desktop
[Desktop Entry]
Encoding=UTF-8
Version=1.9.0
Type=Application
Name=Plex Home Theater
Comment=Starts Plex Home Theater automatically
Exec=sh -c âsleep 30; /usr/bin/pasuspender â env AE_SINK=ALSA /home/plex/plexhometheater.shâ
StartupNotify=false
Terminal=false
Hidden=false
If you donât want to use ALSA, but Pulse Audio instead, modify the Exec line above just to start /home/plex/plexhometheater.sh.
I use ALSA for SPDIF pass-through via the external USB soundcard on my Intel NUC.
Letâs hope that the developers will create official build for Ubuntu 18.04 soon, but you can use this build while you wait for the official. This build will not interfere with the official build, you can run both along side each other.


