I wanted to install Idris, so I first installed Haskell and then wrote cabal update and cabal install idris in the terminal. However, after downloading and installing lots of components, the installation finally failed on some packages. I then did the installation via the Windows-.exe from idris-lang.org and now it runs fine, but I want to remove what was downloaded and installed before with the cabal command. Any idea how to do that? Is there such a command like "cabal deinstall idris" or something? Or would it affect the other installation too?
Related
So, I'm trying to get cabal installed so I can get quickcheck to work in haskell, but nothing seems to work. Whenever I try to run "cabal-install" in my terminal (on mac) I get the same message "command not found", I've looked at multiple different "solutions" and even "solutions" on the cabal website, but nothing seems to work. Any help at all would be much appreciated
cabal-install is a package. cabal is the executable/command installed by the cabal-install package. cabal install is a subcommand of the cabal command—it's the command cabal called with the argument install. Your full command "should" be cabal install QuickCheck, but there's no point in actually executing that command. If you have Cabal v1 or v2, cabal install refers to the version 1 install method, which is broken and dangerous. If you have Cabal v3, cabal install refers to the version 2 install method, where cabal install QuickCheck is pointless. It will install QuickCheck, but QuickCheck is just a library with no executables, so there's no point.
Assuming cabal-install is correctly installed (you should have access to the cabal command), you need to figure out what you're going to do with QuickCheck. If you just want to open a GHCi session, say cabal v2-repl -b QuickCheck. If you want to compile a bunch of files (i.e. you want something more "permanent"), you need to create a package, where the <pkgname>.cabal file contains something along the lines of
build-depends: base, QuickCheck, ..etc
When you build such a package with cabal v2-build, or you start GHCi with cabal v2-repl -b QuickCheck, cabal will go and install QuickCheck automatically if it needs to. This is why cabal v2-install QuickCheck is pointless.
I am trying to install openmpi from Macports on Sierra 10.12.5. It seems that it is a straight forward command:
sudo port install openmpi
When I do this, I get the error:
sudo: port: command not found
I gathered from similar threads that this may be due to openmpi already being installed. How can I check if it is installed, and if so, uninstall it so that I can reinstall it using Macports with the above command? Any thoughts would be great. Thanks!
By default, the port command is installed at /opt/local/bin/port. The installer normally modifies your PATH environment variable to include '/opt/local/bin' so that you can launch stuff installed by MacPorts just by entering the name of the command. I think you should re-do the MacPorts installation. Follow:
https://www.macports.org/install.php
You almost certainly want to use the macOS package installer. You may have to restart Terminal for the new PATH to take effect.
I'm trying to update Cabal on OSX (with ghci 7.8.2 installed), so I run the following commands
cabal update
cabal install cabal-install
To get it up to date, and the installation seems to complete with no errors. However, when I run cabal update again, it still says that I'm not up to date and to run cabal install cabal-install again.
I've read that I might have to do something to make the new version of Cabal have precedence over the one installed with Haskell, but I have no idea how to do this.
Turns out I needed to add /Users/username/Library/Haskell/bin
to $PATH to get the latest version to be used.
I just made a fresh haskell-platform install on a Linux Mint 12, via apt-get. Everytime I try to install some hackage package with cabal-install, I get a:
couldn't read caba file xxxx.cabal
where xxxx is a dependency of the package I'm installing or the package itself. Based on this thread on haskell cafe and other questions here in SO, I deleted the bytestring package from the index:
tar -f ~/.cabal/packages/hackage.haskell.org/00-index.tar --delete bytestring/0.9.2.0
tar -f ~/.cabal/packages/hackage.haskell.org/00-index.tar --delete bytestring/0.9.2.1
but the errors are still there.
My cabal-install version is:
$ cabal --version
cabal-install version 0.10.2
using version 1.10.1.0 of the Cabal library
The error is like this:
$ cabal install yesod
Resolving dependencies...
cabal: Couldn't read cabal file "fsnotify/0.0.5/fsnotify.cabal"
Does anyone knows what might be happening?
I'm having the same problem. There's a relevant mailing list thread about this problem at http://haskell.1045720.n5.nabble.com/Cabal-install-fails-due-to-recent-HUnit-td5715081i20.html
I believe the upshot is that the format of the packages files has changed, and the cabal version in use here (I have the same version, obtained from ubuntu oneiric) can't understand the files. You can't even do "cabal install cabal-install".
The mailing list thread just peters out in september 2012 without a clear decision being made, but I think they decided to just ignore the problem. There's not a clear statement of what to do for users like us; I think the only approach possible is to install haskell from scratch, but I don't yet know where to start with that.
EDIT: I fixed this by downloading the latest source package of cabal from http://hackage.haskell.org/packages/archive/cabal-install/1.16.0.2/cabal-install-1.16.0.2.tar.gz, unpacking it and following the instructions in its README to do a local install.
I was having the same problem and I wasn't able to follow Richard's instructions, so I realized I was running version 7.0.?, I uninstalled it using the command $ uninstall-hs, then installed the newest version (7.6.3). Problem solved here.
How can I check which packages are currently installed?
How can I find all packages that are not installed?
Is possible to uninstall package and all files of that package (config, temporaries, etc.)?
I'm using Debian Squeeze 6.0.7.
dpkg -l
well there will be A LOT of NOT installed packages.. why would you want to do that? btw, the command apt-cache pkgnames will provide you the list of ALL available packages in the repository added in your sources.list configuration
apt-get remove will remove the installed package, but you'll normally keep the configurations, which is the desired behaviour usually.
further info: http://www.cyberciti.biz/howto/question/linux/dpkg-cheat-sheet.php