Remarkably, that makes it work!
(Apparently. If linux programmers cope with this kind of uncertainty on a daily basis, hats off to them.)
Thank you.
Next I would like to try to install the pngcairo terminal for gnuplot. If anyone knows how to do this I would be grateful for assistance (though I would accept that it might not be within the remit of opalstack support to provide help at this level of detail).
In case I can't get that working, here is a more general question:
Some years ago I managed to install gnuplot from source at webfaction using the very comprehensive guide at
https://docs.webfaction.com/software/home-install.html
Would it be recommended (or not) to try the same thing at opalstack?