Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation advice on --force-reinstalls #71

Closed
epogrebnyak opened this issue Oct 22, 2019 · 7 comments
Closed

installation advice on --force-reinstalls #71

epogrebnyak opened this issue Oct 22, 2019 · 7 comments
Labels

Comments

@epogrebnyak
Copy link

I'm trying to install req with cabal install req, I'm getting this message:

cabal: The following packages are likely to be broken by the reinstalls:
HTTP-4000.3.9
Use --force-reinstalls if you want to install anyway.

Should I force-install or there are any other workarounds? Many thanks!

@mrkkrp
Copy link
Owner

mrkkrp commented Oct 22, 2019

Why do you want to cabal install req? Use new- or v2- commands.

@mrkkrp
Copy link
Owner

mrkkrp commented Oct 22, 2019

You create a .cabal file that describes your package and its dependencies and then you do cabal new-build or cabal v2-build and it builds it solving the package version constraints just for this single package in isolation. If you install packages globally you'll quickly find yourself in dependency hell. It's something we did in ~2013 or so.

Or use stack. Or use nix.

@epogrebnyak
Copy link
Author

epogrebnyak commented Oct 22, 2019

It's something we did in ~2013 or so.

I'm learning, so maybe a good lesson in package management.

I'm setting up a remote linux instance, where I can use http-client and req with ghci interpreter, so there really isn't a package I'm developping or supporting now.

I'm trying to get an example from req README to run. So far I installed haskell platfrom with sudo apt-get install haskell-platform and I want to run

Prelude> import Network.HTTP.Req

<no location info>: error:
    Could not find module ‘Network.HTTP.Req’

Is cabal install req --force-reinstalls too risky? Maybe I should reinstall HTTP after running it.

stack would be good for a package too, but not for global installation right?

nix I know nothing about yet, seems quite learning curve.

@epogrebnyak
Copy link
Author

cabal install req --force-reinstalls worked fine for running a README example

@mrkkrp
Copy link
Owner

mrkkrp commented Oct 22, 2019

Usually I experiment by creating a small project. You can do it either with stack or with cabal. I'm not sure why you need a remote linux instance though, you could do it locally on your computer.

The install commands are usually for binaries. What they do is they build the packages and put their executables on PATH (if configured properly).

@epogrebnyak
Copy link
Author

Usually I experiment by creating a small project.

That's a useful tip, not usually found on tutorials. Should learn to use more often.

why you need a remote linux instance though

I'm locked on Windows - in my path I have non-latin characters for home directory, so many installations fail (eg entropy package) and WSL is not yet compatible with cabal and tools using it.

So my choices were either a big local virtualisation or a small remote machine. I use VS Code remote features to handle the remote, so in stable situation it is a good combo.

@mrkkrp
Copy link
Owner

mrkkrp commented Oct 22, 2019

Should we close this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants