How do I successfully add nlpsolver to Calc?

Using ubuntu 32 bit. So far all attempts have shut dow libreoffice completely.