Whenever I try to compile an executable with ghc --make, I am getting the following error when trying to execute the program afterwards, despite there being no errors upon compilation:
./main: error while loading shared libraries: libffi.so.4: cannot open shared object file: No such file or directory
(It works fine if I load the programs into ghci though)
Here's a minimal example program that used to work, but now doesn't (I don't know why)
module Main(main)
where
main = do c <- getContents
putStr c
I am using GHC 7.0.3, on Ubuntu 11.10. Help would be appreciated.
Update: Removing and reinstalling from the package manager didn't fix it either. I do have libffi5 and libffi6, how do I get ghc to use one of these instead of libffi4?