As per the widget, here are a couple of commands you can use to get it fixed without a bunch of footwork.
If you are using a /home partition:
If you are using /(root) partition:
As per plex, you will not need to use other packages or repos. From SSH you can use the QuickBox CLI installer, type
box install plex.