[Hackage] #670: cabal-install should warn about common problem after installing progs

Hackage cvs-ghc at haskell.org
Thu Apr 29 21:42:23 EDT 2010

#670: cabal-install should warn about common problem after installing progs
  Reporter:  duncan              |        Owner:         
      Type:  enhancement         |       Status:  new    
  Priority:  normal              |    Milestone:         
 Component:  cabal-install tool  |      Version:
  Severity:  normal              |     Keywords:         
Difficulty:  easy (<4 hours)     |   Ghcversion:         
  Platform:                      |  
 There are a few common problems have when installing programs.

  * target bindir (or symlink-bindir) is not on the `$PATH` so they cannot
 run the program after installation.
  * target bindir is on the `$PATH` but the installed program is masked by
 the presence of the same named prog in a dir that is earlier on the
 `$PATH`. For example `/usr/local/bin/cabal` and `~/.cabal/bin/cabal`, the
 latter might have just been installed but the earlier one will still be
 picked up.
  * the shell keeping a cache of name -> path and so not picking up a new
 program. Eg in the above example, even if `~/.cabal/bin/` comes first on
 the `$PATH`, if bash has the mapping `cabal` -> `/usr/local/bin/cabal`
 then it will not notice when `~/.cabal/bin/cabal` is installed. The fix
 here is to run `hash -r`.
   The only time we might want to tell users to run `hash -r` is if the
 program did not previously exist and if it gets installed in a location
 that is earlier on the `$PATH` than an existing installed instance (which
 may thus be in the cache). Sadly we cannot query sh to find out what its
 cache holds.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/670>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list