2

When I try to use the version of cabal from the repositories every command gives an out of memory error.

$ cabal install hedis
cabal: out of memory (requested 2097152 bytes)
$ cabal update
Downloading the latest package list from hackage.haskell.org
cabal: out of memory (requested 2097152 bytes)

This is using the versions of cabal and GHC obtained by installing the haskell-platform package (cabal version 1.16.0.2 and GHC version 7.6.3).

EDIT:

The results of running free is:

free -h
             total       used       free     shared    buffers     cached
Mem:          994M       647M       346M       356K       4.2M        59M
-/+ buffers/cache:       583M       410M
Swap:           0B         0B         0B

so it would appear not to be a problem with actually running an actual running out of RAM issue. The hardware is a DigitalOcean VPS.

  • How much RAM do you have? How much Swap? (Find out by typing free) What hardware are you using? you could always strace your command, and see where it is requesting 2,097,152 bytes, then look to see why it wants 2,097,152 bytes. – waltinator Jan 05 '15 at 17:55
  • @waltinator I've updated the original post with the information. – pmgarvey Jan 06 '15 at 11:29
  • @waltinator I have exactly the same message from a completely different porgram (a one I have written; it uses a lot memeory indeed). This exact number 2,097,152 might be simply 2G. An upper limit for allocating memory (set somewhere?) – imz -- Ivan Zakharyaschev Mar 12 '15 at 13:51
  • Try creating some swap space, telling the system to use it and trying again. See man swapon. – waltinator Mar 12 '15 at 17:54

1 Answers1

1

-j1 flag from running out of memory.

$ cabal -j1 install hedis
Gryu
  • 7,559
  • 9
  • 33
  • 52
snehal
  • 111