我正在尝试升级我的 haskell 安装,因为据我所知,它是一个非常旧的版本。
这是我尝试过的:
lpuggini@lpuggini-T3420:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
lpuggini@lpuggini-T3420:~$ stack --version
Version 0.1.10.0 x86_64
lpuggini@lpuggini-T3420:~$ sudo apt upgrade haskell-stack
Reading package lists... Done
Building dependency tree
Reading state information... Done
haskell-stack is already the newest version (0.1.10.0-1).
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
lpuggini@lpuggini-T3420:~$ stack upgrade
Fetched package index.
Populated index cache.
Cabal file warning in /tmp/stack-upgrade1153/stack-1.6.1/stack.cabal: Ignoring unknown section type: custom-setup
Cabal file warning in /tmp/stack-upgrade1153/stack-1.6.1/stack.cabal: Ignoring unknown section type: custom-setup
Invalid package ID: "array-0.5.1.1 base-4.9.1.0 binary-0.8.3.0 bytestring-0.10.8.1"
lpuggini@lpuggini-T3420:~$
答案1
Ubuntu 官方存储库中有旧版本的 haskell-stack。下载最新版本。首先删除堆栈
sudo apt-get 删除 haskell-stack
然后使用这个最新的安装
https://docs.haskellstack.org/en/stable/install_and_upgrade/#ubuntu
答案2
我遇到了同样的错误,因此我删除了旧版本,如前所述:
sudo apt-get remove haskell-stack
然后按照“Linux(通用)”说明进行操作https://docs.haskellstack.org/en/stable/install_and_upgrade/#linux。
该wget
命令对我有用:
wget -qO- https://get.haskellstack.org/ | sh
我曾gcc
通过进行安装sudo apt-get install gcc
,作为最初升级尝试失败的一部分stack
。