Thanks Joel for the reply. I just thought that if CasADi prompted that it couldn't find the packages it would have some problem afterwards. It might well have been a problem of IPOPT, I'm not sure, but the solvers were running alright there. It was only with the CasADi Python interface that the problem occured.
Anyway, all that aside, after 2 days of basically playing around and trying "random" stuff this is my solution:
1. Clean up all existing IPOPT and CasADi libraries from /lib, /usr/lib and /usr/local/lib (I had played with two versions of each one)
2. Reinstall IPOPT, with no change to the HSL routines. Just the basics.
3. Reinstall CasADi. This time I did a "sudo make install" also. Not sure if this is what ultimately fixed it, but it's not specified in the installation instructions.
Now my code runs with both MA27 and MA57 solvers. Maybe this problem doesn't come up that often, I mean I also installed CasADi with IPOPT two times before and everything went pretty smooth. But when it does happen, it's damn frustrating :)
All the best,
Alex