Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

cabal-install should warn about common problem after installing progs #662

bos opened this Issue May 24, 2012 · 2 comments


None yet
3 participants

bos commented May 24, 2012

(Imported from Trac #670, reported by @dcoutts on 2010-04-30)

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.

bos commented May 24, 2012

(Imported comment by @dcoutts on 2010-04-30)

The second one in particular is still tripping up a lot of users. See also #289. We should aim to make this a bit more automatic so that most users will not have to fiddle with the $PATH.

jsl commented Feb 24, 2015

I haven't really had a problem with this, and perhaps others haven't either since there is no activity since 2010. I propose closing - please re-open or create another ticket if this problem still exists.

/cc @tibbe

@tibbe tibbe closed this Feb 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment