Firstly, thanks to all who helped. 

apt-get install -f doesn't help. I solved the problem using the answer in this link:

http://askubuntu.com/questions/588695/cant-install-libglew-dev-because-libcheese-and-libclutter-dont-have-the-requir


which is to do 

sudo apt-get install  libglew-dev libcheese7 libcheese-gtk23 libclutter-gst-2.0-0 libcogl15 libclutter-gtk-1.0-0 libclutter-1.0-0  xserver-xorg-input-all


On Fri, Mar 20, 2015 at 8:54 AM, Dario Bertini <berdario@gmail.com> wrote:
On Ubuntu I usually rely on hvr's ppa to install ghc and cabal

https://launchpad.net/~hvr/+archive/ubuntu/ghc

and then I'd use stackage to have a set of libraries you can rely on install

http://www.stackage.org/lts

sorry if this is a non-answer, anyhow if your error is the same as on
that askubuntu question it seems unrelated to Haskell, have you tried
`apt-get install -f` like mentioned in the comment?
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe