0

I am trying to install the OpenGL-2.4.0.2 package manually, but after I download the tarball from Hackage and decompressed it, when I ran

sudo runhaskell Setup.hs configure

I get these:

Configuring OpenGL-2.4.0.2...
Setup.hs: At least the following dependencies are missing:
GLURaw >=1.1.0.0,
ObjectName -any,
OpenGLRaw >=1.1.0.0,
StateVar -any,
Tensor -any

But I've checked that I've already installed these:

GLURaw 1.1.0.1
ObjectName 1.0.0.0
OpenGLRaw 1.1.0.2
StateVar 1.0.0.0
Tensor 1.0.0.1

And I've tried reinstall these but no avail.

I use GHC 7.2.1, cabal-install 0.8.0 with Cabal 1.8.0.2, under Ubuntu 11.04.

Thanks for any suggestions!

zw324
  • 26,764
  • 16
  • 85
  • 118
  • You are configuring as super user (why?). Are the "missing" packages that you have installed actually installed globally or are they just in the users package config and thus not installed from the super-user's perspective? – Thomas M. DuBuisson Feb 14 '12 at 00:06
  • @ThomasM.DuBuisson: I tried both with sudo and without, but neither worked. Thanks for the attention :) – zw324 Feb 14 '12 at 00:08
  • 1
    But you didn't answer the question. iirc (it's been a while since I installed w/o cabal-install) the default is the global database. If you have the packages installed locally then you need to explicitly specify the local package base via the `--user` flag. – Thomas M. DuBuisson Feb 14 '12 at 00:12
  • @ThomasM.DuBuisson: Thanks! You and Daniel are both right. I apologize for my rather stupid question and not digging into the doc hard enough (or didn't "RTFM"). – zw324 Feb 14 '12 at 00:14
  • 1
    Don't be too hard on yourself, it is pretty confusing that the two ways have different defaults. – Daniel Fischer Feb 14 '12 at 00:21

1 Answers1

2

If you installed the dependencies using cabal-install (the cabal command line programme), they are by default installed in the user package-db. But when you install a package using the runhaskell ./Setup.hs way, it does global installs by default and therefore cannot use packages from the user-db. Try installing the package in the user-db,

runhaskell ./Setup.hs configure --user

or reinstall the dependencies in the global db, cabal install --global foo.

Daniel Fischer
  • 181,706
  • 17
  • 308
  • 431
  • @ZiyaoWei: you can also just do "cabal configure", etc. in that directory rather than directly using "runhaskell Setup.hs". – ivanm Feb 14 '12 at 01:00
  • 1
    @ZiyaoWei or even just `cabal install` in that directory if you don't need any special configuration parameters. – Daniel Fischer Feb 14 '12 at 01:05