Stack: AesonException "Error in $['extra-deps'][0]: failed to parse field 'extra-deps': failed to parse field extra-deps: (Invalid package identifier: \"Cabal-2.4.0.1@rev:0\",\"Cabal-2.4.0.1@rev:0\")"

Created on 3 Jan 2019  路  7Comments  路  Source: commercialhaskell/stack

$ sudo aptitude install haskell-stack
The following NEW packages will be installed:
  haskell-stack 
0 packages upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/5,517 kB of archives. After unpacking 40.2 MB will be used.
Selecting previously unselected package haskell-stack.
(Reading database ... 311256 files and directories currently installed.)
Preparing to unpack .../haskell-stack_1.1.2-7+b1_amd64.deb ...
Unpacking haskell-stack (1.1.2-7+b1) ...
Setting up haskell-stack (1.1.2-7+b1) .
$ stack upgrade
Fetching package index ...remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
Fetched package index.    
Could not parse '/tmp/stack-upgrade102410/stack-1.9.3/stack.yaml':
AesonException "Error in $['extra-deps'][0]: failed to parse field 'extra-deps': failed to parse field extra-deps: (Invalid package identifier: \"Cabal-2.4.0.1@rev:0\",\"Cabal-2.4.0.1@rev:0\")"
See http://docs.haskellstack.org/en/stable/yaml_configuration/.

All 7 comments

What is the stack version you are using ? The latest one is stack-1.9.3. It seems you have 1.1.2 which is quite old. Can you install the latest one ?

Install instructions: https://haskell-lang.org/get-started

I think the version 1.1.2 comes from the current Debian stable - https://packages.debian.org/stretch/haskell-stack and I see no versions in backports for it

@jganetsk try stack upgrade and then probably you also need to set PATH to also include ~/bin/ or something (see the output of stack upgrade, it tells you where your new binary gets placed).

@mihaimaruseac but isn't stack upgrade shown in the staring description of this issue?

Oops, you're right. I just skimmed through the description when I came back to the tab.

@jganetsk then, I think you'd have to use the wget .. | sh line from https://docs.haskellstack.org/en/stable/install_and_upgrade/

Closing due to lack of response

I just encountered the same issue right now. Same error message. stack upgrade says it is downloading version 2.3.3 but when I call stack --version it is still an older one.

$ stack upgrade
Current Stack version: 1.5.1, available download version: 2.3.3
Newer version detected, downloading
Querying for archive location for platform: linux-x86_64-static
Querying for archive location for platform: linux-x86_64
Downloading from: https://github.com/commercialhaskell/stack/releases/download/v2.3.3/stack-2.3.3-linux-x86_64.tar.gz
Download complete, testing executable
Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0
New stack executable available at /home/felix/.local/bin/stack
/media/data2/samurais/cardano-wallet ((v2020-09-22))$ stack --version
Version 1.5.1 x86_64
...

calling which stack shows that it is indeed looking at .local/bin/ for the executable.

I believe there is some OS side caching involved. Opening a new terminal session after that solved the issue. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jwaldmann picture jwaldmann  路  4Comments

fizruk picture fizruk  路  3Comments

abhinav picture abhinav  路  4Comments

tinkyholloway picture tinkyholloway  路  4Comments

s5k6 picture s5k6  路  3Comments