Problems installing new version of cabal for haskell vim now

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

When trying to run the suggested install 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.

      

Then I try to install a newer version of cabal:

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

      

The answer I get is:

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 can I run this plugin? https://github.com/begriffs/haskell-vim-now

edit: I have not used important information. at startup:

cabal install cabal cabal-install

      

I am getting the following output

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

      

+3


source to share


1 answer


Your variable $PATH

seems to be broken. In the 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 (assuming 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 an executable file. 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 yours ~/.bash_profile

has a line that looks something like



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

      

you must add $HOME

to the above for the PATH variable to be set correctly.

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

      

Before your shell looked for cabal in /.cabal/bin/cabal

, but it isn't there.


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

+1


source







All Articles