我尝试在一台运行Ubuntu子系统的Windows笔记本电脑上安装GHC with ghcup。我一直收到同样的错误,我甚至不知道到底是哪里出了问题。以下是错误信息:
[ Info ] verifying digest of: ghc-8.10.7-x86_64-fedora27-linux.tar.xz
[ Info ] Unpacking: ghc-8.10.7-x86_64-fedora27-linux.tar.xz to /tmp/ghcup-61d1fb5776edc19e
[ Info ] Installing GHC (this may take a while)
[ ghc-make ] # on Win64, "install -s" calls a strip that doesn't understand 64bit binaries.
[ ghc-make ] # For some reason, this means the DLLs end up non-executable, which means
[ ghc-make ] "utils/ghc-cabal/dist-install/build/tmp/ghc-cabal-bindist" copy compiler stage2 "strip" '' '/home/levi...
i... Installing library in /home/levi/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/ghc-8.10.7
i... "/home/levi/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/bin/ghc-pkg" --force --global-package-db "/home/levi/.gh...
[ ghc-make ] ghc-pkg: Couldn't open database /home/levi/.ghcup/ghc/8.10.7/lib/ghc-8.10.7/package.conf.d for modific...
i... make[1]: *** [ghc.mk:985: install_packages] Error 1
make: *** [Makefile:51: install] Error 2
[ Error ] BuildFailed failed in dir "/tmp/ghcup-61d1fb5776edc19e": Process "make" with arguments ["install"] failed with exit code 2.
[ ... ] Check the logs at /home/levi/.ghcup/logs and the build directory /tmp/ghcup-61d1fb5776edc19e for more clues.
[ ... ] Make sure to clean up /tmp/ghcup-61d1fb5776edc19e afterwards.
"_eghcup --cache install ghc recommended" failed!
levi@LAPTOP-BBDADJ2R:~$
有什么想法,为什么会发生这种情况,以及如何解决它?
3条答案
按热度按时间djp7away1#
Judging by this issue on the ghcup repo(它引用了与您的错误相同的错误),您使用的是不支持的WSL 1。您必须升级到WSL 2。
vlju58qv2#
m0rkklqb3#
1.打开你的主页-〉在rifgt侧菜单选择“显示隐藏文件”
1.您将能够看到.ghcup文件夹
1.打开.ghcup-〉缓存
1.创建名为ghcup-0.0.7.yaml的文件
1.使用lobalTools粘贴:新一代:dlUri:https://downloads.haskell.org/~ghcup/shimgen/shim-2.exe dl哈希值:工具要求:GHC:未知版本:Linux系统(_D):未知版本控制(_V):分销商 Package :注意:““〉= 11”:分销商 Package :注意:''