Reputation: 63
I'm trying to upgrade my stack version. Currently I am using Ubuntu 18.04 on a VM, and my stack version is 1.5.1 which I downloaded using sudo apt haskell-stack (I was trying to run stack setup (using the latest version) to compile a program, where stack was not found so it recommended me to install it via this method). However, I am wanting to upgrade it to the latest version. This is what I get when I run 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
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
I've also tried running curl -sSL https://get.haskellstack.org/ | sh
which tells me that 'Stack Version 1.5.1 already appears to be installed at: /usr/bin/stack' and refers me to stack-upgrade again. I'm new to stack, so any help would be appreciated - thanks!
Upvotes: 0
Views: 316
Reputation: 116139
It looks like stack was upgraded in a user-local way. Essentially, now you have two stack
executables installed: one in /usr/bin
and one in /home/claraina/.local/bin
.
That is fine. To run the new stack, you have to be sure that your PATH
has the directory /home/claraina/.local/bin
before /usr/bin
in it, so that the new stack is run instead of the old one.
Run echo $PATH
to check your path. Then, if needed, edit .bash_profile
accordingly.
After you edit that file, either log out & log in again, or start a login shell to reload the changes (for that shell).
Upvotes: 1