haskell-stack的奇怪错误.它不再安装任何东西了

Chu*_*lar 11 haskell haskell-stack

我在尝试安装软件包时遇到堆栈错误.

Run from outside a project, using implicit global project config
Using resolver: lts-8.0 from implicit global project's config file: /home/chuck/.stack/global-project/stack.yaml
Invalid package ID: "array-0.5.1.1 base-4.9.1.0 binary-0.8.3.0 bytestring-0.10.8.1"
Run Code Online (Sandbox Code Playgroud)

stack --version工作原理:

Version 0.1.10.0 x86_64
Run Code Online (Sandbox Code Playgroud)

和堆栈设置返回:

Run from outside a project, using implicit global project config
Using resolver: lts-8.0 from implicit global project's config file: /home/chuck/.stack/global-project/stack.yaml
stack will use a locally installed GHC
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec
Run Code Online (Sandbox Code Playgroud)

我重新安装了堆栈,我在新安装后得到了同样的错误.所以,我不知道我做错了什么.我需要它来使用原子.

编辑

Stack.yaml:

# This is the implicit global project's config file, which is only used when
# 'stack' is run outside of a real project.  Settings here do _not_ act as
# defaults for all projects.  To change stack's default settings, edit
# '/home/chuck/.stack/config.yaml' instead.
#
# For more information about stack's configuration, see
# https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
#
flags: {}
extra-package-dbs: []
packages: []
extra-deps: []
resolver: lts-8.0
Run Code Online (Sandbox Code Playgroud)

Chu*_*lar 14

在尝试了很多事情之后,我"找到了答案".

问题是,正如epsilonhalbe所看到的那样,我有一个旧版本.所以我试着这样做但wget -qO- https://get.haskellstack.org/ | sh它没有用,因为我已经堆叠了/usr/bin/,我删除了堆栈,然后再次尝试wget -qO- https://get.haskellstack.org/ | sh.我添加$HOME/.local/bin/到路径中,它正常工作.

我希望它可以帮助别人

编辑

有一个新版本的堆栈,但ghc-mod只能工作到lts-9.0堆栈.所以,如果你遇到麻烦,ghc-mod你的堆栈版本已经结束了8.0.2:

nano /Users/USERNAME/.stack/global-project/stack.yaml

并替换resolver: ---resolver: lts-9.0

然后,在终端上stack solver,它会工作:)