Install Haskell packages using cabal without an internet connection.

I have a machine that does not have internet access.
I installed the Haskell platform on it using the installer that I received from another machine using pendrive.

Now I want to install the repa package on my home machine that does not have internet access. How can I do it?

My home machine is running Linux (Debian), and my office computer is running Windows 7.

+5
source share
2 answers

By car, you can access the Internet:

  • Run cabal get pkg-name , where pkg-name is the required package.
  • Go to the Hackage package page and a .tar.gz file will appear in the Downloads section, which you can download.

After you receive it, transfer it to another machine, remove it anywhere (sandbox, if you just want it in the sandbox). Then from this directory (where there is a .cabal file) run cabal install .

+8
source

Package managers, such as cabal , work internally to get a package from a remote repository. I doubt that there is an easy way to work around the solution for installing the package offline.

Probably the easiest way is to find a compressed version of the package, find a way to get them on a stand-alone computer (local sharing, flash drive, etc.) and install the package manually .

+1
source

Source: https://habr.com/ru/post/1213401/


All Articles