trouble upgrading cabal-install - haskell

I'm having trouble upgrading cabal to version 1.17.0. My current version of cabal is:
edechter#helmholtz cabal-install (master) $ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0.3 of the Cabal library
Here's my attempt:
edechter#helmholtz cabal-install (master) $ cabal install cabal-install-1.17.0
Resolving dependencies...
cabal: Could not resolve dependencies:
rejecting: cabal-install-1.16.0.2, 1.16.0.1, 1.16.0, 0.14.0, 0.10.2, 0.10.0,
0.8.2, 0.8.0, 0.6.4, 0.6.2, 0.6.0, 0.5.2, 0.5.1, 0.5.0, 0.4.0 (global
constraint requires ==1.17.0)
I followed the instructions here: http://www.haskell.org/cabal/FAQ.html#dependencies-conflict
But I don't see anything that conflicts.
Any ideas?

1.16.0.2 is the latest version currently available on Hackage. If you want to try a pre-release version, I suggest using cabal-dev:
$ git clone git://github.com/haskell/cabal.git
$ cd cabal/cabal-install
$ cabal-dev add-source ../Cabal
$ cabal-dev install
The cabal executable will be installed under cabal-dev/bin.

Related

Cabal unexpected behaviour when upgrading

ramiro#omfg-hello:~$ cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
ramiro#omfg-hello:~$ sudo cabal install cabal-install --force-reinstalls
[sudo] password for ramiro:
Resolving dependencies...
Configuring cabal-install-2.4.0.0...
Building cabal-install-2.4.0.0...
Installed cabal-install-2.4.0.0
ramiro#omfg-hello:~$ cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
Indeed i wasn't expecting something like this. I'm stunned.
Edit:
Fixed with #duplode comment
Further edit:
Anybody knows why i'm still getting this?
ramiro#omfg-hello:~/Haskell/happstack-server$ sudo cabal new-test all
cabal: unrecognised command: new-test (try --help)
At least i get the correct cabal version now
ramiro#omfg-hello:~/Haskell/happstack-server$ cabal --v
cabal-install version 2.4.0.0
compiled using version 2.4.0.1 of the Cabal library
EditN :
ramiro#omfg-hello:~/Haskell/happstack-server$ cabal new-build
/home/ramiro/.cabal/packages/hackage.haskell.org: openBinaryTempFileWithDefaultPermissions: permission denied (Permission denied)
ramiro#omfg-hello:~/Haskell/happstack-server$ sudo cabal new-build
[sudo] password for ramiro:
Up to date
ramiro#omfg-hello:~/Haskell/happstack-server$
Non-sudo vs sudo.

Cabal claims it has updated itself but has not really

Following the instructions from this post on how to update cabal-install, I seemed to be able to install the latest version (or at least some version > 1.18, which is what I wanted.
$ cabal install Cabal cabal-install
Resolving dependencies...
Configuring cabal-install-1.22.6.0...
Building cabal-install-1.22.6.0...
Preprocessing executable 'cabal' for cabal-install-1.22.6.0...
<snip>
Linking dist/build/cabal/cabal ...
Installing executable(s) in /home/kavi/.cabal/bin
Installed cabal-install-1.22.6.0
However, when I tried cabal sandbox, it failed, so I checked cabal --version.
$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
As you can see, the version is not the one that cabal claimed to install.
Adding ~/.cabal/bin to my path did nothing to help. (Yes, I did restart my terminal).
$ echo $PATH
<snip>:/home/kavi/.cabal/bin
$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
I tried restarting my computer, but still:
$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
I am using Ubuntu 14.04.
You should add /home/kavi/.cabal/bin to the beginning of the $PATH.
which cabal tells which executable shell will pick to execute, on my machine:
% echo $PATH
/Users/ogre/.local/bin:...
% which cabal
/Users/ogre/.local/bin/cabal

cabal glib installation error

I try install install glib via cabal
evgeny#virtuos:~$ cabal install glib-0.13.0.7
Resolving dependencies...
Failed to install glib-0.13.0.7
cabal: Error: some packages failed to install:
glib-0.13.0.7 failed during the configure step. The exception was:
user error (The package 'glib' requires Cabal library version -any && >=1.18
but no suitable version is installed.)
evgeny#virtuos:~$ cabal --version
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library
what's wrong?
OS: Ubuntu 14.10
Cabal 1.20.0.3
GHC: 7.6.3
Run cabal install cabal-install. Daniel Wagner's suggestion will most likely provide different results than cabal --version.

cabal update not working

I just did a fresh install of GHC 7.6.3, followed by installing the latest platform. But when I run cabal update, I get:
$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
$ cabal update
Downloading the latest package list from hackage.haskell.org
cabal: <file descriptor: 8>: does not exist
What file descriptor is this referring to, and how can I fix this problem?
I've reported this issue on github but haven't gotten any help.

Cabal installing quickcheck version problem

I'm trying to install quickcheck 2 via cabal on Ubuntu 10.04. No matter what I try to do, I always end up with the following:
$ cabal list quickcheck
* QuickCheck
Synopsis: Automatic testing of Haskell programs
Latest version available: 2.1.1.1
Latest version installed: 1.2.0.0
Homepage: http://www.cse.chalmers.se/~koen
License: BSD3
This is on a clean Ubuntu 10.04 with only the ghc6 and cabal-install apt packages installed. I had installed the binary package via cabal before trying to install quickcheck.
It tells me 2.1.1.1 is available, but it only ever installs 1.2.0.0. Why can't I get it to actually install the latest version?
$ cabal install --dry-run quickcheck
Resolving dependencies...
In order, the following would be installed (use -v for more details):
QuickCheck-1.2.0.0
I'm not sure why it chooses the old version, but you can just do:
$ cabal install --dry-run quickcheck-2.1
Resolving dependencies...
In order, the following would be installed (use -v for more details):
mtl-1.1.0.2
QuickCheck-2.1
You can be more specific in the version number, but you don't have to.

Resources