I have both ghci versions 7.10 and 8 installed on my Ubuntu 16.04. I want to install something based on cabal. I already have cabal installed as the command
cabal --version
yields
cabal-install version 1.22.6.0
using version 1.22.5.0 of the Cabal library
But when I go to update with
cabal update
I get
Downloading the latest package list from hackage.haskell.org
cabal: does not exist
So I am not sure what is going on or how to resolve this. I hope to afterwards install gloss which is based on cabal. But
cabal install gloss-examples
yields
Resolving dependencies...
Downloading bindings-DSL-1.0.23...
Downloading bmp-1.2.6.3...
Failed to install bmp-1.2.6.3
Downloading vector-0.10.12.3...
Build log ( /home/username/.cabal/logs/bmp-1.2.6.3.log ):
cabal: /home/username/.cabal/logs/bmp-1.2.6.3.log: does not exist
EDIT: I originally installed ghci 7.10. Then later installed ghci 8. Could this have any effect?
EDIT2: After installing
cabal install Cabal cabal-install
I still get the same error with
cabal update
Also I still cannot
cabal install gloss-examples
But I get a different error this time
Resolving dependencies...
Downloading bindings-DSL-1.0.23...
Downloading bmp-1.2.6.3...
Failed to install bindings-DSL-1.0.23
Downloading vector-0.10.12.3...
Build log ( /home/aa/.cabal/logs/bindings-DSL-1.0.23.log ):
cabal: /home/aa/.cabal/logs/bindings-DSL-1.0.23.log: does not exist
EDIT3: When I installed Cabal, it says that I installed
Installed cabal-install-1.24.0.2
But when I check with
cabal --version
I am still stuck at
cabal-install version 1.22.6.0
which tells me somehow they are not linked.
Related
Recently Installed VS Code in my Ubuntu14.04 . Installed Haskell using Stack.
Getting these errors. Kindly help.
Error: Couldn't start ghc-mod process Error: Command failed: ghc-mod version
Error: Cannot hlint the haskell file. The hlint program was not found. Use the 'haskell.hlint.executablePath' setting to configure the location of 'hlint'
It looks like you've installed 2 extensions for vscode, one for linting and one for running ghc-mod, but you don't have hlint or ghc-mod installed.
If you are using this ghc-mod extension, make sure you have ghc-mod installed through cabal or through stack.
IF you are using this linter extension, make sure you have hlint installed through cabal or through stack.
To install with cabal, run:
cabal install hlint
and
cabal install ghc-mod
To install via stack, see the stack documentation.
I'm currently trying to get SDL2 for Haskell to work on Ubuntu but while trying to install SDL2 with cabal I get the following error
cabal: The pkg-config package sdl2 version >=2.0.3 is required but the version
installed on the system is version 2.0.2
Failed to install sdl2-1.2.0
cabal: Error: some packages failed to install:
sdl2-1.2.0 failed during the configure step. The exception was:
ExitFailure 1
So it seems I do have pkg-config and I do have sdl2 but I seem to have downloaded the wrong version of libsdl-dev? I have the latest version, so is there a way for me to upgrade the pkg-config file?
When I tried loading a module containing import Control.Monad.State
I got
Could not find module ‘Control.Monad.State’
Perhaps you meant
Control.Monad.ST (from base-4.8.2.0)
Control.Monad.ST.Safe (from base-4.8.2.0)
Control.Monad.Fix (from base-4.8.2.0)
Use -v to see a list of the files searched for.
Failed, modules loaded: none.
I installed the Haskell Platform, which has cabal and mtl installed.
When I run cabal update and then cabal install mtl:
Resolving dependencies...
All the requested packages are already installed:
mtl-2.2.1
Use --reinstall if you want to reinstall anyway.
I tried the reinstall flag but it just keeps giving me warnings that I will break other packages so I didn't continue.
My ghc --version is version 7.10.3. cabal --version is 1.22.5.0
This is what I got when I ran ghc-pkg list mtl:
WARNING: cache is out of date: Library/Frameworks/GHC.framework/Versions/7.10.3-x86_64/usr/lib/ghc-7.10.3/package.conf.d/package.cache
ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
/Library/Frameworks/GHC.framework/Versions/7.10.3-x86_64/usr/lib/ghc-7.10.3/package.conf.d
mtl-2.2.1
And when I ran ghc-pkg check :
WARNING: cache is out of date: /Library/Frameworks/GHC.framework/Versions/7.10.3-x86_64/usr/lib/ghc-7.10.3/package.conf.d/package.cache
ghc will see an old view of this package db. Use 'ghc-pkg recache' to fix.
And when I ran ghc-pkg recache
ghc-pkg: /Library/Frameworks/GHC.framework/Versions/7.10.3-x86_64/usr/lib/ghc-7.10.3/package.conf.d/package.cache: you don't have permission to modify this file
This error message failing my installation of haskell-src-exts-1.15.0.1
ld: library not found for -lHScpphs-1.18.5-ghc7.8.2
So I guess my cpphs is missing. When I tried to install cpphs, however
$ cabal install cpphs
Resolving dependencies...
All the requested packages are already installed:
cpphs-1.18.5
Use --reinstall if you want to reinstall anyway.
The similar error happens for text-1.1.1.3.
I have tried erasing everything and reinstalling haskell-platform but it doesnt work.
I use haskell-platform installed from homebrew, but I had already had the latest version of cabal and ghc
λ ~/cabal --version
cabal-install version 1.20.0.3
using version 1.20.0.1 of the Cabal library
λ ~/ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.2
find ing the *.dylib gives no result.
I am trying to use the text-icu library as a dependency in a cabal package on Mac OS. I have icu installed but when I try to build my package cabal gives me this error:
Missing C libraries: icui18n, icudata, icuuc
I'm am unsure what debugging steps to use.
You can use either MacPorts or Homebrew to install the icu package, and have cabal refer to the custom header and library path:
MacPorts
sudo port install icu
cabal install text-icu --extra-include-dirs=/opt/local/include --extra-lib-dirs=/opt/local/lib
Homebrew
brew install icu4c
cabal install text-icu --extra-lib-dirs=/usr/local/opt/icu4c/lib --extra-include-dirs=/usr/local/opt/icu4c/include