
#391: Installing cabal: ./bootstrap.sh: pushd: not found (probably because of /bin/sh) ----------------------------------+----------------------------------------- Reporter: guest | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.2.3.0 Severity: normal | Keywords: Difficulty: very easy (<1 hour) | Ghcversion: 6.8.3 Platform: | ----------------------------------+----------------------------------------- On Ubuntu, trying to install cabal using the "Quick Installation on Unix" instructions at [http://hackage.haskell.org/trac/hackage/wiki/CabalInstall here] says {{{ Setup: At least the following dependencies are missing: Cabal >=1.4&&<1.5, HTTP >=3000&&<3002, zlib >=0.4 ./bootstrap.sh: 24: popd: not found ./bootstrap.sh: 27: pushd: not found }}} and so on. The reason is that bootstrap.sh has a "#!/bin/sh" shebang line, and pushd/popd are Bash extensions, not POSIX shell features, and Ubuntu uses dash, not bash, as /bin/sh (by default). The fix is to make bootstrap.sh either not use Bash-specific extensions, or (easier) make the top line of bootstrap.sh say "#!/bin/bash" instead of "#!/bin/sh". [It might be wise to make the same change in all other files that use Bash extensions; the tool "checkbashims" might be useful here.] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/391 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects