繁体   English   中英

`stack build --nix`导致/ bin / bash:错误的解释器:没有这样的文件或目录

[英]`stack build --nix` results in /bin/bash: bad interpreter: No such file or directory

我以前已经解决了这个问题,但是我不记得自己做了什么。所以我想将其发布在这里以解决它。

我正在尝试使用stack build nix构建Haskell软件包,我正在遵循https://stackoverflow.com/a/47110522/1663462的答案,但它遇到以下错误:

Unpacking GHC into /home/chris/.stack/programs/x86_64-linuRunning /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/ in directory /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/ exited with ExitFailure 1                         

checking for path to top of build tree...                                  
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist: /bin/bash: bad interpreter: No such file or directory       
configure: error: cannot determine current directory    

我该如何解决?


stack --nix setup导致:

Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Already downloaded.                
Running /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/ in directory /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/ exited with ExitFailure 1

checking for path to top of build tree... 
/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist: /bin/bash: bad interpreter: No such file or directory
configure: error: cannot determine current directory


Error: Error encountered while configuring GHC with
         /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/configure --prefix=/home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/
         run in /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/ghc-8.0.2/

       The following directories may now contain files, but won't be used by stack:
         - /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2.temp/
         - /home/chris/.stack/programs/x86_64-linux-nix/ghc-8.0.2/

Configuring GHC ...
nix:
    enable: true
    packages:
      - pkgconfig
      - autoconf
      - gcc
      - xorg.libX11
      - xorg.libXext
      - xorg.libXft
      - xorg.libXinerama
      - xorg.libXpm
      - xorg.libXrandr
      - xorg.libXrender

以上为我工作。 我认为这只是需要的autoconf 如果没有,请用完整列表回答。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM