I'm trying to install Cabal-dev on windows 7.
I've managed to get past the problem with not being able to build network by using this:
cabal install --constraint="network installed" cabal-dev
However then I get this:
>cabal install --constraint="network installed" cabal-dev
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: cabal-dev-0.9.1
trying: cabal-dev-0.9.1:-no-cabal-dev
trying: network-2.3.1.0/installed-489...
rejecting: parsec-3.1.3/installed-62e... (conflict: network =>
parsec==3.1.3/installed-c65...)
rejecting: parsec-3.1.3/installed-c65... (conflict: parsec =>
mtl==2.1.2/installed-533..., cabal-dev-0.9.1:no-cabal-dev => mtl>=1.1 && <2.1)
rejecting: parsec-3.1.3, 3.1.2, 3.1.1, 3.1.0, 3.0.1, 3.0.0, 2.1.0.1, 2.1.0.0,
2.0 (conflict: network => parsec==3.1.3/installed-c65...)
Mikhail Glushenkov's recommendation worked
I cloned the git repo for cabal-dev and then build it like this:
runhaskell -isrc admin/bootstrap.hs
then I added
{windowspath ..}\cabal-dev\cabal-dev\bin
to my path and everything is working.
I can now run cabal-dev install in my yesod folder get yesod working finally.
Related
When I try
$ cabal install gi-cairo
(One of the long list of dependencies to install leksah) I get the following error:
Resolving dependencies...
Configuring haskell-gi-base-0.9...
Building haskell-gi-base-0.9...
Failed to install haskell-gi-base-0.9
Build log ( /home/brandon/.cabal/logs/haskell-gi-base-0.9.log ):
Configuring haskell-gi-base-0.9...
Building haskell-gi-base-0.9...
Preprocessing library haskell-gi-base-0.9...
src/Data/GI/Base/Attributes.hs:105:8:
Could not find module `Data.Proxy'
It is a member of the hidden package `tagged-0.8.5'.
Perhaps you need to add `tagged' to the build-depends in your .cabal file.
Use -v to see a list of the files searched for.
cabal: Error: some packages failed to install:
gi-cairo-0.1.14.8 depends on haskell-gi-base-0.9 which failed to install.
haskell-gi-base-0.9 failed during the building phase. The exception was:
ExitFailure 1
I see the part about tagged, but where is this .cabal file ? On my machine it's a directory at ~/.cabal/, not a file. And what do I add to this supposed file ?
By the way, the output of cabal --version:
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library
My goal is to install the dependencies output by leksah.sh when I run it:
gi-cairo >=1.0.6 && <1.1,
gi-gdk >=3.0.6 && <3.1,
gi-gdkpixbuf >=2.0.6 && <2.1,
gi-gio >=2.0.6 && <2.1,
gi-glib >=2.0.6 && <2.1,
gi-gobject >=2.0.6 && <2.1,
gi-gtk >=3.0.6 && <3.1,
gi-gtk-hs >=0.3.1.0 && <0.4,
gi-gtksource >=3.0.6 && <3.1,
gi-pango >=1.0.6 && <1.1,
gi-webkit2 >=4.0.6 && <4.1,
haskell-gi-base >=0.18 && <0.21,
haskell-src-exts >=1.13.5 && <1.19,
leksah-server >=0.16.1.0 && <0.17,
ltk >=0.16.0.0 && <0.17,
regex-tdfa >=1.1 && <1.3,
regex-tdfa-text -any,
vcsgui >=0.2.0 && <0.3
I've been trying to solve this since last night, but I don't see anything like this documented anywhere when I Google.
UPDATE: When I try running cabal install leksah, I get the following errors:
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: leksah-0.15.2.0 (user goal)
trying: vcswrapper-0.1.1/installed-1eQ... (dependency of leksah-0.15.2.0)
next goal: transformers (dependency of leksah-0.15.2.0)
rejecting: transformers-0.5.2.0/installed-3Es... (conflict: leksah =>
transformers>=0.2.2.0 && <0.5)
rejecting: transformers-0.3.0.0/installed-ff2... (conflict:
transformers-compat-0.5.1.4:three => transformers>=0.4.1 && <0.6)
rejecting: transformers-0.5.2.0, 0.5.1.0, 0.5.0.1, 0.5.0.0 (conflict: leksah
=> transformers>=0.2.2.0 && <0.5)
trying: transformers-0.4.3.0
next goal: mtl (dependency of leksah-0.15.2.0)
rejecting: mtl-2.2.1/installed-4vs... (conflict: transformers==0.4.3.0, mtl =>
transformers==0.5.2.0/installed-3Es...)
rejecting: mtl-2.1.2/installed-94c..., 2.2.1, 2.2.0.1, 2.2, 2.1.3.1, 2.1.2,
2.1.1, 2.1, 2.0.1.1, 2.0.1.0, 2.0.0.0, 1.1.1.1, 1.1.1.0, 1.1.0.2, 1.1.0.1,
1.1.0.0, 1.0 (conflict: vcswrapper => mtl==2.2.1/installed-4vs...)
Backjump limit reached (change with --max-backjumps).
So I tried cabal install leksah --max-backjumps -1 per the manpage of cabal and after about 10 minutes it's now consuming >40% of the memory of my machine, so I simply can't continue on that route.
The Data.Proxy module moved to the base package in base-4.7.0.0 which was part of the ghc-7.6 series. The haskell-gi-base you are trying to install is also quite old. I expect that it was selected because the newest version that could satisfy the version constraints, but that those version constraints are wrong. Your version of GHC must be older than this.
The solution is to update your GHC and cabal-install. Current version of GHC 8.0.2 and the current version of cabal-install is 1.24.0.2. You need at least version 1.24 of cabal-install when you upgrade to GHC 8. Fortunately the Minimal Haskell Platform comes with an up-to-date GHC, cabal-install, and even stack!
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 build my Hakyll site using Travis-CI. However, before I even get that far, I have a dependencies error when trying to install Hakyll as a dependency.
I can build Hakyll locally on my machine with no problems. What might be causing the dependency error, and how can it be resolved? Is there a way to resolve it without actually hard-coding each dependency version?
Here's the output that comes from TravisCI.
travis_fold:end:git.5
$ export PATH=/usr/local/ghc/$(ghc_find 7.6)/bin/:$PATH
travis_fold:start:cabal
$ cabal update
Config file path source is default config file.
Config file /home/travis/.cabal/config not found.
Writing default configuration to /home/travis/.cabal/config
Downloading the latest package list from hackage.haskell.org
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install
travis_fold:end:cabal
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
$ cabal --version
cabal-install version 1.18.0.2
using version 1.18.1 of the Cabal library
travis_fold:start:before_install.1
$ cabal update
Downloading the latest package list from hackage.haskell.org
Note: there is a new version of cabal-install available.
To upgrade, run: cabal install cabal-install
travis_fold:end:before_install.1
travis_fold:start:before_install.2
$ cabal install hakyll pandoc
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: hakyll-4.5.3.0 (user goal)
trying: base-4.6.0.1/installed-8aa... (dependency of hakyll-4.5.3.0)
trying: hakyll-4.5.3.0:+checkexternal
trying: http-conduit-2.1.2.3 (dependency of hakyll-4.5.3.0:+checkexternal)
trying: http-client-0.3.3.2 (dependency of http-conduit-2.1.2.3)
trying: exceptions-0.6.1 (dependency of http-client-0.3.3.2)
trying: transformers-0.4.1.0 (dependency of http-conduit-2.1.2.3)
next goal: mtl (dependency of hakyll-4.5.3.0)
rejecting: mtl-2.2.1, 2.2.0.1, 2.2 (conflict: hakyll => mtl>=1 && <2.2)
rejecting: mtl-2.1.3.1, 2.1.2 (conflict: transformers==0.4.1.0, mtl =>
transformers==0.3.*)
rejecting: mtl-2.1.1, 2.1 (conflict: base==4.6.0.1/installed-8aa..., mtl =>
base<4.6)
rejecting: mtl-2.0.1.1 (conflict: transformers==0.4.1.0, mtl =>
transformers==0.2.*)
rejecting: mtl-2.0.1.0, 2.0.0.0 (conflict: base==4.6.0.1/installed-8aa..., mtl
=> base<4.6)
rejecting: mtl-1.1.1.1, 1.1.1.0, 1.1.0.2, 1.1.0.1, 1.1.0.0, 1.0 (conflict:
exceptions => mtl>=2.0 && <2.3)
Backjump limit reached (change with --max-backjumps).
[31;1mThe command "cabal install hakyll pandoc" failed and exited with 1 during .[0m
Your build has been stopped.
If there's any other output that would be useful, let me know and I can provide it.
The first thing to try if you get Backjump limit reached from cabal-install is to try again with the option --max-backjumps=-1 which means "search exhaustively", though if it then ends up taking tens of minutes you'd need to interrupt it or rely on the Travis-CI timeout. You can also use 500 or 1000 rather than -1 for a large but limited search - the default is 200.
If that doesn't work then try to pick out specific projects to constrain to a specific version with the option --constraint 'foo==0.1.0.0, preferably one that you actually know should be installable with the same GHC version.
In this particular case, the following two lines suggest that hakyll itself was at the root of the problem:
rejecting: mtl-2.2.1, 2.2.0.1, 2.2 (conflict: hakyll => mtl>=1 && <2.2)
rejecting: mtl-2.1.1, 2.1 (conflict: base==4.6.0.1/installed..., mtl => base<4.6)
In other words, base, which is tied to the GHC version, seems to require mtl>=2.2 (or perhaps less than 2.1 but I suspect that wouldn't have worked either). hakyll was requiring mtl<2.2, so there seemed to be a fundamental conflict implying that this version of hakyll wouldn't work this version of base.
Lets assume that I have updated to the all the package index of my cabal using
cabal update
Now, let's say I have an old project (Yesod in my case) which I get and want to work upon.
So, I go inside the directory and issue the following commands:
cd project
cabal sandbox init
cabal configure
The above command throws a lot of dependency problems like this:
cabal: At least the following dependencies are missing:
aeson >=0.6 && <0.8,
attoparsec >=0.11 && <1.0,
.......... This goes on
Then I try this command:
cabal install --only-dependencies
This doesn't help much either and throws the following error:
trying: yesod-static-1.2.4 (dependency of project-0.0.1.0)
trying: wai-app-static-3.0.0 (dependency of yesod-static-1.2.4)
next goal: warp (dependency of project-0.0.1.0)
rejecting: warp-3.0.0.1, 3.0.0 (conflict: project => warp>=2.1 && <2.2)
rejecting: warp-2.1.5.2, 2.1.5.1, 2.1.5, 2.1.4.1, 2.1.4, 2.1.3.3, 2.1.3.2,
2.1.3.1, 2.1.3, 2.1.2.1, 2.1.2, 2.1.1.2, 2.1.1.1, 2.1.1, 2.1.0 (conflict:
wai-app-static => warp>=3.0 && <3.1)
------------ This goes on
What is the general approach to solve this type of 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.