Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Unable to install GHC error #76

Closed
parsonsmatt opened this issue Sep 20, 2021 · 7 comments
Closed

Unable to install GHC error #76

parsonsmatt opened this issue Sep 20, 2021 · 7 comments

Comments

@parsonsmatt
Copy link

I'm getting this error when running CI:

https://github.com/parsonsmatt/some-dict-of/runs/3657365243?check_suite_focus=true

Installing ghc version 8.10.4
  Warning: ghc 8.10.4 was not found in the cache. It will be downloaded.
  If this is unexpected, please check if version 8.10.4 is pre-installed.
  The list of pre-installed versions is available here: https://help.github.com/en/actions/reference/software-installed-on-github-hosted-runners
  The above list follows a common haskell convention that the three latest major releases of ghc are commonly supported.
  If the list is outdated, please file an issue here: https://github.com/actions/virtual-environments
  by using the appropriate tool request template: https://github.com/actions/virtual-environments/issues/new/choose
  Attempting to install ghc 8.10.4 using apt-get
  /usr/bin/sudo -- sh -c apt-get -y install ghc-8.10.4
  Reading package lists...
  Building dependency tree...
  Reading state information...
  E: Unable to locate package ghc-8.10.4
  E: Couldn't find any package by glob 'ghc-8.10.4'
  E: Couldn't find any package by regex 'ghc-8.10.4'
  Attempting to install ghc 8.10.4 using ghcup
  /opt/hostedtoolcache/ghcup/0.1.8/x64/ghcup install 8.10.4
  [ Warn  ] New GHCup version available: 0.1.16.2. To upgrade, run 'ghcup upgrade'
  [ Warn  ] This is an old-style command for installing GHC. Use 'ghcup install ghc' instead.
  [ Error ] No available GHC version for 8.10.4
Error: All install methods for ghc 8.10.4 failed

https://github.com/parsonsmatt/some-dict-of/blob/master/.github/workflows/haskell.yml is the config

any idea what's going on here?

@andreasabel
Copy link
Member

andreasabel commented Sep 21, 2021

Run actions/[email protected]

@parsonsmatt: Could it be that your are requesting an outdated version? v1.1.4 was released in Nov 2020 when GHC 8.10.4 didn't exist yet, as far as I remember.

I am using the v1 tag instead which is always the latest of the v1.x.y releases.

See https://github.com/haskell/actions/releases and #18.

@parsonsmatt
Copy link
Author

The CI run completed fine 28 days ago, pulling GHC 8.10.4 from the cache.

Updating to v1 tag does not fix it https://github.com/parsonsmatt/some-dict-of/pull/2/checks?check_run_id=3663835881

@andreasabel
Copy link
Member

Your latest CI run says:

Attempting to install ghc 8.10.4 using ghcup
  /opt/hostedtoolcache/ghcup/0.1.8/x64/ghcup install 8.10.4
  [ Warn  ] New GHCup version available: 0.1.16.2. To upgrade, run 'ghcup upgrade'
  [ Warn  ] This is an old-style command for installing GHC. Use 'ghcup install ghc' instead.
  [ Error ] No available GHC version for 8.10.4

ghcup-0.1.8 is maybe too old. Don't know.

It could be that your CI failed because the hosted runner dropped 8.10.4, and the ghcup method for 8.10.4 never worked for your CI.

Dunno, how about upgrading to 8.10.7? Is there a reason to stick to 8.10.4?

@hazelweakly
Copy link
Collaborator

Try replacing actions/setup-haskell@v1 with haskell/actions/setup@v1. I do really wish I had been able to add a migration warning before the actions repo archived the old haskell action... I've been bit myself by this and I wrote it

@andreasabel
Copy link
Member

Ah, puzzle solved. I wouldn't have been able to spot this subtlety!
Maybe update the issue title to something more specific so that others can find the solution more easily?

@parsonsmatt
Copy link
Author

Yeah, that did it! Thanks.

Man, I wonder if there's some way to poison-pill the original repo? Looks like they'd need to un-archive it for any changes to be made.

@andreasabel
Copy link
Member

The OP has been solved. Closing.

@andreasabel andreasabel closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants