Ticket #391 (closed defect: fixed)

Opened 5 years ago

Last modified 17 months ago

Installing cabal: ./bootstrap.sh: pushd: not found (probably because of /bin/sh)

Reported by: guest Owned by:
Priority: normal Milestone:
Component: cabal-install tool Version: 1.2.3.0
Severity: normal Keywords:
Cc: Difficulty: very easy (<1 hour)
GHC Version: 6.8.3 Platform:

Description

On Ubuntu, trying to install cabal using the "Quick Installation on Unix" instructions at  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.]

Change History

Changed 4 years ago by duncan

  • status changed from new to closed
  • resolution set to fixed

It is fixed in the 0.6.0 release.

Changed 17 months ago by elga

Changed 17 months ago by edouard

D'autre part, la palette d'informations detaillees relatives a l'obtention du code rio Simyo et du numero rio Virgin Mobile sont egalement disponibles.  rio bouygues

Note: See TracTickets for help on using tickets.