Problem with installation of openfoam-adapter

Then OpenFOAM itself works fine. You could then try building any function object. It will be installed to your $FOAM_USER_LIBBIN directory. You could then run ldd $FOAM_USER_LIBBIN/your_function_object.so and see if you get similar errors. But I am not sure if it is worth the effort, it will not help you fix the problem.

Different version of Boost is fine. The only important point is that OpenFOAM and preCICE link to the same MPI.

preCICE works with any Linux system, Ubuntu is just easier to set everything up, because it is more widespread and many projects (including OpenFOAM and preCICE) provide binary packages to install.

Spack simply makes it easy to build software when you don’t have all the dependencies you need. I would recommend giving it a try, but you should then either also build OpenFOAM with Spack (with the same MPI version), or tell Spack to use the same MPI for preCICE, as the one used for OpenFOAM. It can definitely get complicated.

By the way, CentOS provides an mpi-selector, which lets you select your MPI installation. Are you aware of this?