title: cabal: error while loading shared libraries: libHSzlib-0.5.4.1-ghc7.6.3.so
body: <p>I've done a fresh install of the Haskell platform on CentOS 7, like so:</p>
  
  <pre><code>[amy@wombat115 ~]$ sudo yum install haskell-platform
  Loaded plugins: fastestmirror, product-id, subscription-manager
  This system is not registered with Subscription Management. You can use subscription-manager to register.
  Loading mirror speeds from cached hostfile
   * base: ftp.sunet.se
   * epel: ftp.lysator.liu.se
   * extras: ftp.sunet.se
   * updates: ftp.sunet.se
  Resolving Dependencies
  --&gt; Running transaction check
  ---&gt; Package haskell-platform.x86_64 0:2013.2.0.0-36.el7 will be installed
  --&gt; Processing Dependency: ghc-haskell-platform-devel = 2013.2.0.0-36.el7 for package: haskell-platform-2013.2.0.0-36.el7.x86_64
  --&gt; Processing Dependency: cabal-install = 1.16.0.2 for package: haskell-platform-2013.2.0.0-36.el7.x86_64
  --&gt; Running transaction check
  ---&gt; Package cabal-install.x86_64 0:1.16.0.2-32.el7 will be installed
  ---&gt; Package ghc-haskell-platform-devel.x86_64 0:2013.2.0.0-36.el7 will be installed
  --&gt; Processing Dependency: ghc = 7.6.3 for package: ghc-haskell-platform-devel-2013.2.0.0-36.el7.x86_64
  --&gt; Running transaction check
  ---&gt; Package ghc.x86_64 0:7.6.3-18.3.el7 will be installed
  --&gt; Finished Dependency Resolution
  
  Dependencies Resolved
  
  =====================================================================================================================================
   Package                                     Arch                    Version                             Repository             Size
  =====================================================================================================================================
  Installing:
   haskell-platform                            x86_64                  2013.2.0.0-36.el7                   epel                   12 k
  Installing for dependencies:
   cabal-install                               x86_64                  1.16.0.2-32.el7                     epel                  452 k
   ghc                                         x86_64                  7.6.3-18.3.el7                      epel                   35 k
   ghc-haskell-platform-devel                  x86_64                  2013.2.0.0-36.el7                   epel                   15 k
  
  Transaction Summary
  =====================================================================================================================================
  Install  1 Package (+3 Dependent packages)
  
  Total download size: 514 k
  Installed size: 2.9 M
  Is this ok [y/d/N]: y
  Downloading packages:
  (1/4): haskell-platform-2013.2.0.0-36.el7.x86_64.rpm                                                          |  12 kB  00:00:00     
  (2/4): ghc-haskell-platform-devel-2013.2.0.0-36.el7.x86_64.rpm                                                |  15 kB  00:00:00     
  (3/4): ghc-7.6.3-18.3.el7.x86_64.rpm                                                                          |  35 kB  00:00:00     
  (4/4): cabal-install-1.16.0.2-32.el7.x86_64.rpm                                                               | 452 kB  00:00:01     
  -------------------------------------------------------------------------------------------------------------------------------------
  Total                                                                                                461 kB/s | 514 kB  00:00:01     
  Running transaction check
  Running transaction test
  Transaction test succeeded
  Running transaction
    Installing : ghc-7.6.3-18.3.el7.x86_64                                                                                         1/4 
    Installing : ghc-haskell-platform-devel-2013.2.0.0-36.el7.x86_64                                                               2/4 
  /var/tmp/rpm-tmp.5ERaqJ: line 1: /usr/bin/ghc-pkg: No such file or directory
    Installing : cabal-install-1.16.0.2-32.el7.x86_64                                                                              3/4 
    Installing : haskell-platform-2013.2.0.0-36.el7.x86_64                                                                         4/4 
    Verifying  : cabal-install-1.16.0.2-32.el7.x86_64                                                                              1/4 
    Verifying  : ghc-haskell-platform-devel-2013.2.0.0-36.el7.x86_64                                                               2/4 
    Verifying  : ghc-7.6.3-18.3.el7.x86_64                                                                                         3/4 
    Verifying  : haskell-platform-2013.2.0.0-36.el7.x86_64                                                                         4/4 
  
  Installed:
    haskell-platform.x86_64 0:2013.2.0.0-36.el7                                                                                        
  
  Dependency Installed:
    cabal-install.x86_64 0:1.16.0.2-32.el7    ghc.x86_64 0:7.6.3-18.3.el7    ghc-haskell-platform-devel.x86_64 0:2013.2.0.0-36.el7   
  
  Complete!
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <pre><code>[amy@wombat115 ~]$ cabal update
  cabal: error while loading shared libraries: libHSzlib-0.5.4.1-ghc7.6.3.so: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>I have tried the following, to no effect:</p>
  
  <pre><code>sudo yum reinstall ghc-zlib-devel
  sudo yum reinstall zlib-devel
  sudo yum reinstall ghc-ghc-devel
  </code></pre>
  
  <hr>
  
  <p>EDIT: I have also tried the following:</p>
  
  <pre><code>sudo yum reinstall ghc-zlib-devel-0.5.4.1
  sudo yum reinstall ghc-zlib-devel-0.5.4.1-26.el7
  sudo yum reinstall cabal-install
  sudo yum reinstall ghc-Cabal
  </code></pre>
  
  <hr>
  
  <p>EDIT: If <code>yum whatprovides libHSzlib*ghc*</code> is to be believed, <code>ghc-zlib-devel</code> installs <code>libHSzlib-0.5.4.1-ghc7.6.3.so</code>. However, the only file <code>find / -name 'libHSzlib*.so' returns is</code>libHSzlib-0.5.4.1-ghc7.8.3.so` (note the <em>8</em> vs. <em>6</em>).</p>