Your problem is that you just have to re-set your preferences in lyx to let it know that you want to run pdflatex with --shell-escape flag.
This flag can not be a default feature in open source systems (and general but once more in open source) because a hacker can harm your system. See here.
So, your upgraded version came without that feature enabled and this is why you get the error.
The best practice is to run such codes (with minted package or similar that requires this flag) only if the code is yours (or trusted) from command line (adding manually this flag) or using a similar way to enable it (not by default but only when you need it).
For example, to compile a file main.tex in your home folder, you have just to
open a terminal and write the command:
pdflatex --shell-escape main
To see how you can get rid the error (and in the same time let your system be vulnerable when running untrusted LaTeX code) see here.
--shell-escapelike here: https://tex.stackexchange.com/a/144432/120578 – koleygr Sep 20 '18 at 03:30