Haskell Could not find module 'Graphics.Gloss'

3.1k views Asked by At

I'm trying to run a simple Gloss program in Haskell on Xubuntu 14.04. Now i've run the same program before with no issues on the same machine a while ago but it seems like its no longer working. Apparently it thinks Gloss is not installed when it is.

I've tried a lot of things with no luck.

Error when trying to compile program:

MyProg.hs:2:8:
    Could not find module `Graphics.Gloss'
    Use -v to see a list of the files searched for.

When using -v flag:

Glasgow Haskell Compiler, Version 7.6.3, stage 2 booted by GHC version 7.6.3
Using binary package database: /usr/lib/ghc/package.conf.d/package.cache
Using binary package database: /home/myuser/.ghc/x86_64-linux-7.6.3/package.conf.d/package.cache
package GLUT-2.4.0.0-31a913db9728fc0bba038e31af3ad274 is unusable due to missing or recursive dependencies:
  OpenGL-2.8.0.0-344e8603ffa2fe942e6526830661f0ee
package OpenGL-2.8.0.0-344e8603ffa2fe942e6526830661f0ee is shadowed by package OpenGL-2.8.0.0-965a1de4ba5cd960ad85db9941a93722
package gloss-1.8.1.2-eb3652fd7115ec4d025ca235f1e1d64d is unusable due to missing or recursive dependencies:
  GLUT-2.4.0.0-31a913db9728fc0bba038e31af3ad274 OpenGL-2.8.0.0-344e8603ffa2fe942e6526830661f0ee
package gloss-raster-1.8.1.2-fd045cd6d26cf5909eb1793d4659a1f3 is unusable due to missing or recursive dependencies:
  gloss-1.8.1.2-eb3652fd7115ec4d025ca235f1e1d64d
hiding package HTTP-4000.2.8 to avoid conflict with later version HTTP-4000.2.19
hiding package Cabal-1.16.0 to avoid conflict with later version Cabal-1.22.4.0
hiding package binary-0.5.1.1 to avoid conflict with later version binary-0.6.4.0
hiding package network-2.4.1.2 to avoid conflict with later version network-2.6.2.0
hiding package parallel-3.2.0.3 to avoid conflict with later version parallel-3.2.0.6
hiding package GLURaw-1.3.0.0 to avoid conflict with later version GLURaw-1.4.0.2
hiding package binary-0.6.4.0 to avoid conflict with later version binary-0.7.4.0
wired-in package ghc-prim mapped to ghc-prim-0.3.0.0-d5221a8c8a269b66ab9a07bdc23317dd
wired-in package integer-gmp mapped to integer-gmp-0.5.0.0-2f15426f5b53fe4c6490832f9b20d8d7
wired-in package base mapped to base-4.6.0.1-8aa5d403c45ea59dcd2c39f123e27d57
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.8.0.0-a3012803fde1dc362e555b35a1a78e6d
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
*** Chasing dependencies:
Chasing modules from: *MyProg.hs

MyProg.hs:2:8:
    Could not find module `Graphics.Gloss'
    Locations searched:
      Graphics/Gloss.hs
      Graphics/Gloss.lhs
*** Deleting temp files:
Deleting: 
*** Deleting temp dirs:
Deleting: 

What seems to be the issue? (The machine has not changed at all since the program last worked fine, I had installed and used Gloss successfully then).

1

There are 1 answers

0
josepereira1 On

To install the "Graphics.Gloss" module run:

cabal install --lib gloss