我正在尝试升级我的堆栈版本。目前我在一个虚拟机上使用Ubuntu 18.04,我的堆栈版本是1.5.1,它是我使用sudo apt haskell-stack下载的(我试图运行堆栈安装程序(使用最新版本)来编译一个程序,其中没有找到堆栈,所以它建议我通过这种方法安装它)。但是,我想把它升级到最新版本。这是我运行堆栈升级时得到的结果:
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
Downloading complete, testing executable
Version 2.3.3., Git revision cb44d51bed48b723a5de08c3348c0b3ccfc437e x86_64 hpack-0.33.0
WARNING: Installation path /home/claraina/.local/bin not found on the PATH environment variable
New stack executable available at home/claraina/.local/bin/stack我也试过运行curl -sSL https://get.haskellstack.org/ | sh,它告诉我“stack version1.5.1似乎已经安装在:/usr/bin/stack”,并建议我再次进行堆栈升级。我是新入门的堆栈,所以任何帮助都将不胜感激--谢谢!
发布于 2020-08-16 15:58:35
看起来堆栈是以用户本地的方式升级的。实际上,现在已经安装了两个stack可执行文件:一个在/usr/bin中,另一个在/home/claraina/.local/bin中。
这很好。要运行新堆栈,必须确保PATH中的目录/home/claraina/.local/bin在/usr/bin之前,这样才能运行新堆栈而不是旧堆栈。
运行echo $PATH检查您的路径。然后,如果需要,可以使用edit .bash_profile accordingly。
编辑该文件后,注销并再次登录,或者启动登录shell以重新加载更改(针对该shell)。
https://stackoverflow.com/questions/63434479
复制相似问题