Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cabal failed to install package because it needs cabal

When I try to install directory package I get following error:

$ cabal install directory
Resolving dependencies...
Failed to install directory-1.2.2.1
cabal: Error: some packages failed to install:
directory-1.2.2.1 failed during the configure step. The exception was:
user error (The package requires Cabal library version -any && >=1.10 but no
suitable version is installed.)

My cabal version is:

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

I tried to execute cabal install Cabal but it depens on directory so it also fails. What is wrong and how I can fix it?

like image 808
Trismegistos Avatar asked Nov 01 '22 05:11

Trismegistos


1 Answers

Cabal (a library) and cabal-install (an executable) are not the same thing. You need to upgrade your cabal-install:

cabal install cabal cabal-install

Your version (1.16) is ancient.

like image 129
sinelaw Avatar answered Nov 12 '22 23:11

sinelaw