issues with installing newer cabal version for haskell vim now

120 views Asked by At

I would like to install this vim plugin: https://github.com/begriffs/haskell-vim-now

When trying to run the suggested installation script:

curl -o - https://raw.githubusercontent.com/begriffs/haskell-vim-now/master/install.sh | bash

I get:

--- Cabal version 1.18 or later is required. Aborting.

I then try to install a newer version of cabal:

me@me:~/Downloads/cabal-install-1.22.6.0$ ./bootstrap.sh

The response I get:

Installed cabal-install-1.22.4.0

But when getting the version:

cabal --version

cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library 

How do I get this plugin running? https://github.com/begriffs/haskell-vim-now

edit: I've left out an important piece of information. when running:

cabal install cabal cabal-install

I get the following output

Installing executable(s) in /home/me/.cabal/bin
Installed cabal-install-1.22.4.0
1

There are 1 answers

0
FDinoff On BEST ANSWER

Your $PATH variable seems to be broken. In a comment you said it was

/home/me/google-cloud-sdk/bin:/.cabal/bin:/usr/local/sbin:/usr/local/bin:/usr/sb‌​in:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games 

This means that your shell (assumed to be bash) will look in the following directories

/home/me/google-cloud-sdk/bin
/.cabal/bin
/usr/local/sbin
/usr/local/bin
/usr/sb‌​in
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games 

when looking for executable. If you look at the second item in your path it is /.cabal/bin. It should be $HOME/.cabal/bin (where $HOME is your home directory)

Most likely your ~/.bash_profile has a line that looks something like

PATH="/.cabal/bin:$PATH"

you should add a $HOME to the above so that the PATH variable is set properly.

PATH="$HOME/.cabal/bin:$PATH"

Before your shell was looking for cabal in /.cabal/bin/cabal however it isn't there.


Other information on PATH: http://www.linfo.org/path_env_var.html