Deluge error on Ubuntu VNC

If you receive the following error when trying to start deluge on Ubuntu VNC:

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/deluge/ui/gtkui/", line 349, in _on_reactor_start
File "/usr/lib/python2.7/dist-packages/deluge/ui/", line 559, in start_classic_mode
self._daemon_proxy = DaemonClassicProxy(self.__event_handlers)
File "/usr/lib/python2.7/dist-packages/deluge/ui/", line 432, in __init__
self.__daemon = deluge.core.daemon.Daemon(classic=True)
File "/usr/lib/python2.7/dist-packages/deluge/core/", line 144, in __init__
from deluge.core.core import Core
File "/usr/lib/python2.7/dist-packages/deluge/core/", line 38, in 
from deluge._libtorrent import lt
File "/usr/lib/python2.7/dist-packages/deluge/", line 59, in 
import libtorrent as lt
ImportError: /usr/lib/python2.7/dist-packages/ undefined symbol: _ZNK10libtorrent5entry4dictEv

This is caused by the qbittorrent team publishing a libtorrent-rasterbar update which was compiled in a way which makes it incompatible with deluge. You therefore need to remove qbittorrent and the incompatible version and remove the package list which contains it, then reinstall deluge using the following commands in your Ubuntu VNC terminal, or via SSH:

sudo apt remove -y libtorrent-rasterbar9 libtorrent-rasterbar10
sudo rm -f rm /etc/apt/sources.list.d/qbittorrent-team-ubuntu-qbittorrent-stable-bionic.list
sudo apt update
sudo apt install -y deluge deluged