4

I have been trying to set up OCaml, OPAM, related libraries and UTOP on Ubuntu 14.04 based on instructions from Real World OCaml. I have currently managed to install OCaml compilers and OPAM. However, when trying to install core and UTOP, I get the following errors:

[ERROR] core is not a valid versioned package name

'opam install core utop' failed.

and

[ERROR] utop is not a valid versioned package name

'opam install utop' failed.

I'd greatly appreciate it if someone could provide suggestions as to what the issue is and how to tackle it.

Thanks!

EDIT: Based on feedback, I have included more details about the installation. I installed OPAM 1.1.1. The last commands performed in the installation was

opam switch 4.03.0

which compiled that version for me, and then

eval 'opam config env'

However, I am still unable to install core and utop because they are apparently not valid versioned package names.

Community
  • 1
  • 1
  • I think you should at least provide your OPAM version, and the version of the (OCaml) switch in which you are trying to install core and utop. – iguerNL Aug 01 '16 at 07:10
  • In your eval command, are those single quotes `'` or backquotes `\``? It has to be a backquote. – hugomg Aug 10 '16 at 19:06

3 Answers3

1

You may need to run opam init and/or opam update. See the end of the Basics section here.

Daiwen
  • 727
  • 1
  • 4
  • 15
1

Your Opam version (1.1.1) is quite old. Is it the version shipped with Ubuntu 14.04?

I suggest to install the newest Opam 1.2.2 (as in August, 2016), by compiling from its source code. You can take a look at these websites:

Trung Ta
  • 1,582
  • 1
  • 16
  • 25
0

I think there is no need to install OCaml and Opam separately. when you install Opam, OCaml is also come with it.then what you have to do is to install utop using opam. So my advice is to remove all ocaml and opam related packages and then reinstall opam, verify whether ocaml is installed and finally install utop.

take a look at this post for more info

ThilankaD
  • 1,021
  • 1
  • 13
  • 24