Key Generation Error

Hello, hope to find you well. Can someone please help me figure out this error when trying to generate a keypair?

terminate called after throwing an instance of ‘lbcrypto│
::OpenFHEException’ │
what(): /usr/local/include/openfhe/pke/cryptocontext.│
h:l.116:GetContextForPointer(): Cannot find context for │
the given pointer to CryptoContextImpl │
Aborted (core dumped)

Thanks in advance.

@asbeel see my answer to this question

Thank you so much for the response.