我以前已经解决了这个问题,但是我不记得自己做了什么。。。以为我会把它张贴在这里解决它。
我正在尝试使用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 ...
答案 0 :(得分:0)
nix:
enable: true
packages:
- pkgconfig
- autoconf
- gcc
- xorg.libX11
- xorg.libXext
- xorg.libXft
- xorg.libXinerama
- xorg.libXpm
- xorg.libXrandr
- xorg.libXrender
以上内容对我有用。我认为只需要autoconf
。回答不完整的情况。