Have you installed the ocaml using opam? Then it is just means, that at installation time, the necessary dependencies for compiling the Graphics module where not found, and the configure script has left them out. Add the required dependencies and re-install the opam switch. Unfortunately it means re-compiling all installed packages. Maybe, you can a) add the dependencies b) Install an alias for your switch c) copy the graphics related libs/stubs to the original swich Looks, like it may work, but I have not tried it. În mie., 14 feb. 2018 la 06:53, Tim Leonard a scris: > I tried to install the ocaml graphics package, but it fails. Any > suggestions for how I can fix it? > Other than the missing graphics package, my ocaml install is working fine. > > ~/Documents/Work/Code/OCaml with graphics: opam update > > =-=- Updating package repositories > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > [default: http] Command started > [default: http] Command started > [default] synchronized from https://opam.ocaml.org > > ~/Documents/Work/Code/OCaml with graphics: opam upgrade > Already up-to-date. > > ~/Documents/Work/Code/OCaml with graphics: opam install graphics > The following actions will be performed: > ∗ install graphics 1.0 > > =-=- Gathering sources > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > > =-=- Processing actions > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > [graphics: ocamlc graphics.cma] Command started > [ERROR] The compilation of graphics failed at "ocamlc -custom > graphics.cma -o > test". > > #=== ERROR while installing graphics.1.0 > ======================================# > # opam-version 1.2.2 > # os darwin > # command ocamlc -custom graphics.cma -o test > # path /Users/Tim/.opam/system/build/graphics.1.0 > # compiler system (4.04.0) > # exit-code 2 > # env-file > /Users/Tim/.opam/system/build/graphics.1.0/graphics-14648-7afd23.env > # stdout-file > /Users/Tim/.opam/system/build/graphics.1.0/graphics-14648-7afd23.out > # stderr-file > /Users/Tim/.opam/system/build/graphics.1.0/graphics-14648-7afd23.err > ### stderr ### > # File "_none_", line 1: > # Error: Cannot find file graphics.cma > > =-=- Error report > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > The following actions failed > ∗ install graphics 1.0 > No changes have been performed > > =-=- graphics.1.0 troubleshooting > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > => This package checks whether the Graphics library was compiled. > >