Установка стека Yesod завершается неудачно при распаковке GHC - PullRequest
0 голосов
/ 15 июня 2019

Запуск stack install yesod-bin --install-ghc завершается неудачно при распаковке ghc с сообщением: «Проблема при распаковке C: \ Users \ user \ AppData \ Local \ Programs \ stack \ x86_64-windows \ ghc-8.4.4.tar.xz"

Я пытаюсь запустить эту команду в Windows 10 64-битной, cmd, с последней версией платформы Haskell 8.6.5-core-x86_64 после создания проекта с шаблоном yesod-sqlite. Я пробовал другую версию, с тем же результатом. stack install yesod-bin-1.4.11 --install-ghc

> stack install yesod-bin --install-ghc
Preparing to install GHC to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-8.4.4.
Downloaded 7z.dll.
Downloaded 7z.exe.
Problem while decompressing C:\Users\user\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.4.tar.xz

stack build повторная попытка и ошибка в той же точке. Вместо этого я ожидаю правильной установки.

Обновление : stack setup --verbose Вывод:

Version 1.9.3, Git revision 40cf7b37526b86d1676da82167ea8758a854953b (6211 commits) x86_64 hpack-0.31.1
2019-06-16 16:47:58.662299: [debug] Checking for project config at: E:\Dev\haskell\dosey\stack.yaml
2019-06-16 16:47:58.666295: [debug] Loading project config file stack.yaml
2019-06-16 16:47:58.675310: [debug] Decoding build plan from: C:\sr\build-plan\lts-12.26.yaml
2019-06-16 16:47:58.678295: [debug] Trying to decode C:\sr\build-plan-cache\lts-12.26.cache
2019-06-16 16:47:58.689295: [debug] Success decoding C:\sr\build-plan-cache\lts-12.26.cache
2019-06-16 16:47:58.696299: [debug] Potential GHC builds: standard
2019-06-16 16:47:58.698299: [debug] Found already installed GHC builds:
2019-06-16 16:47:59.145295: [debug] Trying to setup GHC build: standard
2019-06-16 16:47:59.147298: [info] Preparing to install GHC to an isolated location.
2019-06-16 16:47:59.149296: [info] This will not interfere with any system-level installation.
2019-06-16 16:47:59.151297: [debug] Downloading from https://github.com/commercialhaskell/ghc/releases/download/ghc-8.4.4-release/ghc-8.4.4-x86_64-unknown-mingw32.tar.xz to C:\Users\user\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.4.tar.xz ...
2019-06-16 16:47:59.153294: [debug] Will check against sha1 hash: 697db44cdf7fdf1a6d83ada61e36857f2e241e3d
2019-06-16 16:47:59.157298: [debug] Will check against sha256 hash: da29dbb0f1199611c7d5bb7b0dd6a7426ca98f67dfd6da1526b033cd3830dc05
2019-06-16 16:48:00.717297: [info] Already downloaded.
2019-06-16 16:48:00.721299: [debug] Downloading from https://github.com/fpco/minghc/blob/master/bin/7z.dll?raw=true to C:\Users\user\AppData\Local\Programs\stack\x86_64-windows\7z.dll ...
2019-06-16 16:48:00.724298: [debug] Will check against sha1 hash: 168a288d4456f0473f66e86a2d6fec4eb6f4b993
2019-06-16 16:48:00.729295: [info] Already downloaded.
2019-06-16 16:48:00.731294: [debug] Downloading from https://github.com/fpco/minghc/blob/master/bin/7z.exe?raw=true to C:\Users\user\AppData\Local\Programs\stack\x86_64-windows\7z.exe ...
2019-06-16 16:48:00.738296: [debug] Will check against sha1 hash: 187dff8a3327da87050f678579816e5bae40c632
2019-06-16 16:48:00.742294: [info] Already downloaded.
2019-06-16 16:48:00.744297: [debug] Run process: C:\Users\user\AppData\Local\Programs\stack\x86_64-windows\7z.exe x -oC:\Users\user\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.4-tmp1496\ -y C:\Users\user\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.4.tar.xz
2019-06-16 16:48:02.169297: [debug] Process finished in 1423ms: C:\Users\user\AppData\Local\Programs\stack\x86_64-windows\7z.exe x -oC:\Users\user\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.4-tmp1496\ -y C:\Users\user\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.4.tar.xz
Problem while decompressing C:\Users\user\AppData\Local\Programs\stack\x86_64-windows\ghc-8.4.4.tar.xz

1 Ответ

0 голосов
/ 25 июня 2019

Другая попытка установки cabal показала, что сетевой пакет вообще не желает компилироваться в Windows, по крайней мере, не в общей командной строке (cmd), но для этого требуется MingW, MSys или Cygwin.Я попробовал последний для самообновления клики, и это удалось.Затем в Cygwin я снова попробовал установить стек, и он сработал.

К сожалению, вывод команды стека не дал никаких подсказок Cygwin и на какое-то время оставил меня в неведении.Однако в Cygwin Yesod создает и запускает, и демо-сайт работает правильно.Может быть, некоторый акцент на стандартную командную строку Windows поможет избежать таких недоразумений.

...