gpt4 book ai didi

haskell - 如何在 WSL 上运行 stack ghci?

转载 作者:行者123 更新时间:2023-12-05 05:53:16 25 4
gpt4 key购买 nike

我在 WSL(Windows 10 上的 Ubuntu 20.04.3 LTS)中安装了 Haskell 堆栈。之后,我使用命令成功安装了堆栈 curl -sSL https://get.haskellstack.org/| sh

但是,在我尝试运行 gchi 之后,出现了这个错误:

et@DESKTOP-D0DE6C4:~$ stack ghci
Writing implicit global project config file to: /home/et/.stack/global-project/stack.yaml
Note: You can change the snapshot via the resolver field there.
Using latest snapshot resolver: lts-18.16
Preparing to install GHC (tinfo6) to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-tinfo6-8.10.7.
ghc-pkg: Couldn't open database /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/lib/ghc-8.10.7/package.conf.d for modification: {handle: /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7/lib/ghc-8.10.7/package.conf.d/package.cache.lock}: hLock: invalid argument (Invalid argument)
make[1]: *** [ghc.mk:985: install_packages] Error 1
make: *** [Makefile:51: install] Error 2
Received ExitFailure 2 when running
Raw command: /usr/bin/make install
Run from: /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7.temp/ghc-8.10.7/


Error: Error encountered while installing GHC with
make install
run in /home/et/.stack/programs/x86_64-linux/ghc-tinfo6-8.10.7.temp/ghc-8.10.7/

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

For more information consider rerunning with --verbose flag

Installing GHC ...
et@DESKTOP-D0DE6C4:~$

--verbose 标志没有帮助,因为它再次显示相同的错误。我没有设法用谷歌搜索任何有用的东西。

最佳答案

我按照此处说明安装了 WSL 2 WSL | Ubuntu之后我成功安装了 stack ghci。谢谢Joseph为了这个想法。

关于haskell - 如何在 WSL 上运行 stack ghci?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69921366/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com