Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ocamlfind command not found

I'm running into an issue installing a package that's reliant on ocamlfind but I'm getting an ocamlfind: command not found error when making.

I have installed ocamlfind with the ocaml package manager and have tried reinstalling using "opam reinstall ocamlfind".

I have also tried the 'eval opam config env' command to see if updates my bin.

Has anyone run into a similar issue/know what this might be caused by

The output when running the make:

make
ocamlfind ocamlc -pp "camlp4o -I lib/dcg -I lib/ipp pa_dcg.cmo pa_ipp.cmo" -w usy -thread -I lib -I lib/dcg -I lib/ipp       -c semantics.ml
/bin/sh: ocamlfind: command not found

The output when trying ocamlfind

ocamlfind
-bash: ocamlfind: command not found

ocaml is installed

opam install ocamlfind
[NOTE] Package ocamlfind is already installed (current version is 1.5.5).

and when running the eval command

eval 'opam config env'
CAML_LD_LIBRARY_PATH="/home/centos/.opam/system/lib/stublibs:/usr/lib64/ocaml/stub libs"; export CAML_LD_LIBRARY_PATH;
MANPATH="/home/centos/.opam/system/man:"; export MANPATH;
PERL5LIB="/home/centos/.opam/system/lib/perl5"; export PERL5LIB;
OCAML_TOPLEVEL_PATH="/home/centos/.opam/system/lib/toplevel"; export OCAML_TOPLEVEL_PATH;
PATH="/home/centos/.opam/system/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/centos/.local/bin:/home/centos/bin"; export PATH;

I'm on a server running centos 7

like image 680
Bard117 Avatar asked Jun 01 '15 21:06

Bard117


2 Answers

This command

eval 'opam config env'

is almost assuredly a typo and was supposed to be

eval `opam config env`

though using $(...) instead is the modern equivalent and avoids this font-fact confusion

eval $(opam config env)

That being said that just sets the environment variables in the current shell session (and exports them for use by processes run by this shell session).

As such that needs to be run in every shell session that needs those set (including each line of the makefile that expects them to be set if the environment that runs make doesn't already have them set and exported).

like image 81
Etan Reisner Avatar answered Nov 03 '22 08:11

Etan Reisner


try

sudo apt-get install ocaml-findlib
like image 44
Ajay P Avatar answered Nov 03 '22 06:11

Ajay P