cabal update fails
Problem:
After installing cabal, running
$ cabal update
shows an error message
Command 'cabal' not found, but can be installed with:
sudo apt install cabal-install
Solution:
Add ~/.local/bin and ~/.cabal/bin to the PATH
Open your .bashrc and add the following lines at the bottom:
export PATH="~/.cabal/bin:$PATH" export PATH="~/.local/bin:$PATH"
Save the changes, and source your .bashrc file
$ source .bashrc
Now will be able to run cabal update
$ cabal update
> Downloading the latest package list from hackage.haskell.org
...