First did
sudo apt-get install haskell-platform
, then followed these instructions...
https://github.com/leksah/leksah#building-on-linux
Set PATH in ~/.profile to "PATH="$HOME/.cabal/bin:$PATH""
sudo apt-get install libgtksourceview-3.0-dev libwebkitgtk-3.0-dev
cabal update
cabal install Cabal cabal-install
cabal install regex-tdfa-text --ghc-options=-XFlexibleContexts
cabal install alex happy
cabal install gtk2hs-buildtools
cabal install leksah
leksah
Got this horrendous error message on "cabal install leksah"...
Installing executable(s) in /home/johnreedlol/.cabal/bin
Installed gtk2hs-buildtools-0.13.0.5
johnreedlol#johnreedcomputer:~/leksahFolder$ cabal install leksah
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: leksah-0.15.1.4
trying: hlint-1.9.28
rejecting: haskell-src-exts-1.17.1, 1.17.0 (conflict: leksah =>
haskell-src-exts>=1.13.5 && <1.17)
rejecting: haskell-src-exts-1.16.0.1, 1.16.0, 1.15.0.1, 1.15.0, 1.14.0.1,
1.14.0, 1.13.5 (conflict: hlint => haskell-src-exts>=1.17 && <1.18)
rejecting: haskell-src-exts-1.13.4, 1.13.3, 1.13.2, 1.13.1, 1.13.0, 1.12.0,
1.11.1, 1.10.2, 1.10.1, 1.10.0, 1.9.6, 1.9.5, 1.9.4, 1.9.3, 1.9.0, 1.8.2,
1.8.1, 1.8.0, 1.7.2, 1.7.1, 1.7.0, 1.6.1, 1.6.0, 1.5.3, 1.5.2, 1.5.1, 1.5.0,
1.4.0, 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.0, 1.1.4, 1.1.3.1, 1.1.3,
1.1.1, 1.1.0, 1.0.1, 1.0.0, 0.5.7, 0.5.6, 0.5.5, 0.5.4, 0.5.3, 0.5.2, 0.4.8,
0.4.6, 0.4.5, 0.4.4.1, 0.4.4, 0.4.3.1, 0.4.3, 0.4.2, 0.4.1, 0.3.12, 0.3.11,
0.3.10, 0.3.9, 0.3.7, 0.3.5, 0.3.4, 0.3.3, 0.3.2, 0.2.1 (conflict: leksah =>
haskell-src-exts>=1.13.5 && <1.17)
johnreedlol#johnreedcomputer:~/leksahFolder$
Ultimately went with "sudo apt-get install leksah"
Here we are in the first ring of dependency hell: hlint wants haskell-src-exts in the range [1.17, 1.18) and leksah wants it in the range [1.13.5, 1.17). If we wanted to build the project rather than use apt-get, we can
wait for the leksah package maintainer to update the upper bound,
do it ourselves,
or clone leksah/leksah and use stack build.
Leksah has a stack.yaml set up, which means it should Just Work⢠with stack. Note that bullet one seems unlikely. The leksah project sadly is in a state of stasis.
Related
I'm trying to install leksah as my development environment using cabal but I ran into errors.
user#home:~$ cabal install leksah
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: leksah-0.15.2.0 (user goal)
next goal: base (dependency of leksah-0.15.2.0)
rejecting: base-4.10.0.0/installed-4.1... (conflict: leksah => base>=4.0.0.0 && <4.9)
rejecting: base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
Backjump limit reached (currently 2000, change with --max-backjumps or
try to run with --reorder-goals).
other detauls regarding haskell install in my machine are as follows -
user#home:~$ ghci --version
The Glorious Glasgow Haskell Compilation System, version 8.2.1
user#home:~$ cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
user#home:~$ stack --version
Version 1.3.2, Git revision 3f675146590da4f3edf768b89355f798229da2a5 (4395 commits) x86_64 hpack-0.15.0
Any suggestions to resolve these errors?
Let's get the dependencies straight:
leksah has version 0.15.2, which has been released ~18 months ago. It depends on a base package strictly lower than 4.9 (see also the version bump commit).
ghc has version 8.2.1. According to the release notes, the base package has version 4.10.0.0.
You cannot install another base package - it is intrinsically linked to the ghc version (see this post). Note that the version of the base package for ghc 8.0.1 (release notes) is4.9.0.0.
So either
install a haskell version prior to 8, bringing with it an older base package, or
install leksah from its github source (install instructions), or
work with the other contributors to perhaps release a 0.15.1 (or whatever) just bumping versions (provided it's still working of course).
It looks weird though - there are commits in the last two weeks, however the download page mentions that they are planning a 0.16 version - this was half a year ago.
I'm kind of wondering why there is an upper limit on ghcs minor version - currently the version requirement is set to base >=4.0.0.0 && <4.11. So when a ghc next bumps the base package again, the same problem arises. So leksah is pretty much locked to the ghc release cycle.
How can I possible fix this?
$ cabal install http-conduit
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: attoparsec-0.13.0.1/installed-5b6... (user goal)
trying: http-conduit-2.1.8 (user goal)
trying: monad-control-1.0.0.5 (dependency of http-conduit-2.1.8)
next goal: conduit (dependency of http-conduit-2.1.8)
rejecting: conduit-1.2.6.1, 1.2.6, 1.2.5.1, 1.2.5, 1.2.4.3, 1.2.4.2, 1.2.4.1,
1.2.4, 1.2.3.1 (conflict: attoparsec =>
transformers==0.5.1.0/installed-426..., conduit => transformers>=0.2.2 &&
<0.5)
rejecting: conduit-1.2.3, 1.2.2.2, 1.2.2.1, 1.2.2, 1.2.1, 1.2.0.2, 1.2.0.1,
1.2.0, 1.1.7, 1.1.6, 1.1.5, 1.1.4, 1.1.3, 1.1.2.1, 1.1.2, 1.1.1.1, 1.1.1,
1.1.0.2, 1.1.0.1, 1.1.0, 1.0.17.1, 1.0.17, 1.0.16, 1.0.15.1, 1.0.15, 1.0.14,
1.0.13.1, 1.0.13, 1.0.12, 1.0.11.1, 1.0.11, 1.0.10.1, 1.0.10, 1.0.9.3,
1.0.9.2, 1.0.9.1, 1.0.9, 1.0.8, 1.0.7.4, 1.0.7.3, 1.0.7.2, 1.0.7.1, 1.0.7,
1.0.6, 1.0.5.1, 1.0.5, 1.0.4.2, 1.0.4.1, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0.2,
1.0.0.1, 1.0.0, 0.5.6, 0.5.5 (conflict: monad-control==1.0.0.5, conduit =>
monad-control>=0.3.1 && <0.4)
rejecting: conduit-0.5.4.2, 0.5.4.1, 0.5.4, 0.5.3, 0.5.2.7, 0.5.2.6, 0.5.2.5,
0.5.2.4, 0.5.2.3, 0.5.2.2, 0.5.2.1, 0.5.2, 0.5.1, 0.5.0, 0.4.2, 0.4.1.1,
0.4.1, 0.4.0.1, 0.4.0, 0.3.0, 0.2.2, 0.2.1, 0.2.0, 0.1.1.1, 0.1.1, 0.1.0,
0.0.4, 0.0.3, 0.0.2, 0.0.1.1, 0.0.1, 0.0.0.2, 0.0.0.1, 0.0.0 (conflict:
http-conduit => conduit>=0.5.5 && <1.3)
Backjump limit reached (change with --max-backjumps).
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
And
$ cabal --version
cabal-install version 1.22.8.0
using version 1.22.7.0 of the Cabal library
The issue was that conduit required an older version of transformers than the one at the base of your dependency tree.
Since then, a newer conduit has been uploaded that lifts the upper bound: http://hackage.haskell.org/package/conduit-1.2.6.2
Now, if you try the same procedure, things should work...
I am trying to update pandoc on ubuntu 14.04 but it is failing due to unresolved dependencies:
leonardo#ICI-LAS:~$ sudo cabal update
Downloading the latest package list from hackage.haskell.org
ICI-LAS:~$ sudo cabal install pandoc pandoc-citeproc
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: pandoc-1.15.2.1
trying: pandoc-1.15.2.1:-old-locale
trying: pandoc-1.15.2.1:+network-uri
trying: network-2.6.0.2/installed-f92...
rejecting: unix-2.6.0.1/installed-808... (conflict: unix =>
time==1.4.0.1/installed-11d..., pandoc-1.15.2.1:old-locale => time>=1.5 &&
<1.6)
rejecting: unix-2.7.1.0, 2.7.0.1, 2.7.0.0, 2.6.0.1, 2.6.0.0, 2.5.1.1, 2.5.1.0,
2.5.0.0, 2.4.2.0, 2.4.1.0, 2.4.0.2, 2.4.0.1, 2.4.0.0, 2.3.2.0, 2.3.1.0,
2.3.0.0, 2.2.0.0, 2.0 (conflict: network => unix==2.6.0.1/installed-808...)
ICI-LAS:~$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
ICI-LAS:~$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
How can I resolve this problem?
I'm trying to follow the following Yesod tutorial http://yannesposito.com/Scratch/en/blog/Yesod-tutorial-for-newbies/, but I'm getting the following error when trying to do cabal-dev install
cabal-dev install -v
/usr/bin/cabal --numeric-version
/usr/local/bin/ghc-pkg --version
Using ghc-pkg 7.6.3
/usr/bin/cabal --version
/usr/bin/cabal --config-file=/home/pedro/HaskellPlaying/TestApi/MyApiTest/cabal-dev/cabal.config install --verbose=2
Reading available packages...
Choosing modular solver.
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: MyApiTest-0.0.0 (user goal)
trying: fast-logger-2.0.0/installed-a9d... (dependency of MyApiTest-0.0.0)
next goal: warp (dependency of MyApiTest-0.0.0)
rejecting: warp-2.0.1, 2.0.0.1, 2.0.0 (conflict: MyApiTest => warp>=1.3 &&
<1.4)
trying: warp-1.3.10.1
next goal: wai (dependency of warp-1.3.10.1)
rejecting: wai-2.0.0 (conflict: warp => wai>=1.3 && <1.5)
trying: wai-1.4.1
next goal: wai-extra (dependency of MyApiTest-0.0.0)
rejecting: wai-extra-2.0.0.1, 2.0.0 (conflict: MyApiTest => wai-extra>=1.3 &&
<1.4)
rejecting: wai-extra-1.3.4.6, 1.3.4.5, 1.3.4.4, 1.3.4.3, 1.3.4.2, 1.3.4.1,
1.3.4, 1.3.3.2, 1.3.3.1, 1.3.3, 1.3.2.4 (conflict:
fast-logger==2.0.0/installed-a9d..., wai-extra => fast-logger>=0.2 && <0.4)
rejecting: wai-extra-1.3.2.3, 1.3.2.2, 1.3.2.1, 1.3.2, 1.3.1.1, 1.3.1,
1.3.0.5, 1.3.0.4, 1.3.0.3, 1.3.0.2, 1.3.0.1, 1.3.0 (conflict: wai==1.4.1,
wai-extra => wai>=1.3 && <1.4)
rejecting: wai-extra-1.2.0.6, 1.2.0.5, 1.2.0.4, 1.2.0.3, 1.2.0.2, 1.2.0.1,
1.2.0, 1.1.0.1, 1.1.0, 1.0.0.1, 1.0.0, 0.4.6, 0.4.5.2, 0.4.5.1, 0.4.5, 0.4.4,
0.4.3, 0.4.2, 0.4.1.2, 0.4.1.1, 0.4.0.3, 0.4.0.2, 0.4.0.1, 0.4.0, 0.3.3,
0.3.2.1, 0.3.2, 0.3.1, 0.3.0, 0.2.4.2, 0.2.4.1, 0.2.4, 0.2.3, 0.2.2.2,
0.2.2.1, 0.2.2, 0.2.1, 0.2.0, 0.1.3.1, 0.1.3, 0.1.2.1, 0.1.2, 0.1.1, 0.1.0,
0.0.0.2, 0.0.0.1, 0.0.0 (conflict: MyApiTest => wai-extra>=1.3 && <1.4)
I'm new cabal so I don't really understand the problem, though it seems like the issue is that someone wants wai-extra to be one version while something else wants it to be something else.
Could someone tell me what the issue is and how to fix it? Thanks.
It looks to me like you have a mismatch between the version of the scaffolded site and the version of Yesod you have installed. If you run yesod version, you can see which version of the scaffolded site you have generated.
Your best bet is to install the newest version of both the yesod-bin package and the yesod-platform package. You can find instructions for this on the Yesod quick start page, but it's essentially the command:
cabal install yesod-bin yesod-platform
Then try generating a new scaffolding, and you should hopefully be good-to-go.
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.