title: Braving cabal hell on Ubuntu 12.04
body: <p>Attempting to travel through the entirety of Cabal dependency hell in 12.04 precise build of Ubuntu, and I have been making slow progress.</p>
  
  <p>My first bash command 
  <code>cabal install --allow-newer</code> yields the following message at the bottom of a long list of new packages:</p>
  
  <blockquote>
  <pre><code>cabal: The following packages are likely to be broken by the
  reinstalls:
      regex-posix-0.95.1 
      regex-compat-0.95.1 
  Use `--force-reinstalls` if you want to install anyway.
  </code></pre>
  </blockquote>
  
  <p>(NOTE: A force reinstall was never ran.)</p>
  
  <p>How can I fix these packages and finish the process of installing cabal?
  I must stay in 12.04 and cabal has been updated.</p>
  
  <p><code>cabal install ad --reorder-goals</code> ended up getting it to install.</p>
  
  <p>However I am still not out of cabal hell, as I now have to deal with:</p>
  
  <blockquote>
    <p>cabal: At least the following dependencies are missing: aeson -any, json-schema -any, monad-logger -any, mtl -any, persistent -any, persistent-postgresql ==2.1.6, persistent-template -any, rest-core -any, rest-snap -any, snap-core -any, snap-server -any, text -any"</p>
  </blockquote>
  
  <p>when I attempt to execute <code>cabal build</code></p>
  
  <p>UPDATE: The dependencies needed list has shrunk to:
  monad-logger, persistent, (Fine name for a cabal installer.)
  persistant-postgresql == 2.1.6
  'persistent-template
  rest-snap
  snap-core
  snap-server</p>
  
  <p>So aside from persistant-postgresql any version will work. </p>
  
  <p>Update 2 : Good news though, Running <code>sudo apt-get install libghc-zlib-dev</code> 
  Uncovers an interesting roadblock. </p>
  
  <p>While trying as suggested in one of the answers in this question : <a href="https://stackoverflow.com/questions/8961413/zlib-build-error-with-ghc/9030944#9030944/%20Question">Question</a></p>
  
  <p>to install libghc-zlib-bindings-dev, which installed fine, and libghc-zlib-dev.</p>
  
  <p>The zlib is the dependency that is in the way right now. Once that installs progress will continue. </p>
  
  <p>Current warning on the <code>libghc-zlib-dev</code> install attempt : </p>
  
  <blockquote>
    <p>warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.UTF-8
    are supported and installed on your system.</p>
  </blockquote>
  
  <p>also </p>
  
  <blockquote>
    <p>perl: warning : Falling back to the standard locale ("C"). </p>
  </blockquote>
  
  <p>displayed. </p>
  
  <p>Perhaps this can help us dig deeper into the investigation. </p>
  
  <p>Trudge out of cabal hell we must. </p>
  
  <p>Pretty sure this is the place to plant the red flag : </p>
  
  <blockquote>
    <p>#include "zlib.h"</p>
    
    <p>^</p>
    
    <p>compilation terminated.
    setup-Simple-Cabal-1.22.2.0-x86_64-linux-ghc-7.10.1: Missing dependency on > a
    foreign library:
    * Missing (or bad) header file: zlib.h
    * Missing C library: z</p>
  </blockquote>
  
  <p>Man I wish this site would have auto Ctrl - C Ctrl -V formating, how awesome would that be? </p>