# Having Problem When installing utop in ocaml 4.06

**URL:** <https://discuss.ocaml.org/t/having-problem-when-installing-utop-in-ocaml-4-06/1102>\
**Category:** Ecosystem\
**Tags:** utop\
**Created:** [November 11, 2017, 10:06am UTC](https://discuss.ocaml.org/t/having-problem-when-installing-utop-in-ocaml-4-06/1102 "2017-11-11T10:06:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Kashongwe](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jonathan\_Kashongwe](https://discuss.ocaml.org/u/Jonathan_Kashongwe)\
**Post date:** [November 11, 2017, 10:06am UTC](https://discuss.ocaml.org/t/having-problem-when-installing-utop-in-ocaml-4-06/1102/1 "2017-11-11T10:06:38Z")

</div>

Hi, i’m new to Ocaml and When i try to install utop, i got this error :  
#=== ERROR while installing zed.1.5 ===========================================#

# opam-version 1.2.2

# os darwin

# command jbuilder build -p zed -j 4

# path /Users/jonakash/.opam/4.06.0/build/zed.1.5

# compiler 4.06.0

# exit-code 1

# env-file /Users/jonakash/.opam/4.06.0/build/zed.1.5/zed-10970-6d07ae.env

# stdout-file /Users/jonakash/.opam/4.06.0/build/zed.1.5/zed-10970-6d07ae.out

# stderr-file /Users/jonakash/.opam/4.06.0/build/zed.1.5/zed-10970-6d07ae.err

### stderr

# Error: This expression has type bytes but an expression was expected of type

# […]

# (cd \_build/default && /Users/jonakash/.opam/4.06.0/bin/ocamlc.opt -w -40 -g -bin-annot -I /Users/jonakash/.opam/4.06.0/lib/bytes -I /Users/jonakash/.opam/4.06.0/lib/camomile -I /Users/jonakash/.opam/4.06.0/lib/ocaml -I /Users/jonakash/.opam/4.06.0/lib/react -no-alias-deps -I src -o src/zed\_rope.cmo -c -impl src/zed\_rope.ml)

# File “src/zed\_rope.ml”, line 541, characters 13-91:

# Error: This expression has type bytes but an expression was expected of type

# Zed\_utf8.t = string

# ocamlopt src/zed\_utf8.{cmx,o} (exit 2)

# (cd \_build/default && /Users/jonakash/.opam/4.06.0/bin/ocamlopt.opt -w -40 -g -I /Users/jonakash/.opam/4.06.0/lib/bytes -I /Users/jonakash/.opam/4.06.0/lib/camomile -I /Users/jonakash/.opam/4.06.0/lib/ocaml -I /Users/jonakash/.opam/4.06.0/lib/react -no-alias-deps -I src -o src/zed\_utf8.cmx -c -impl src/zed\_utf8.ml)

# File “src/zed\_utf8.ml”, line 303, characters 26-29:

# Error: This expression has type bytes but an expression was expected of type

# string

Help Me please,

---

<div class="post-metadata">

**Author:** ![dbuenzli](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/dbuenzli/32/18_2.png) [@dbuenzli](https://discuss.ocaml.org/u/dbuenzli)\
**Post date:** [November 11, 2017, 11:42am UTC](https://discuss.ocaml.org/t/having-problem-when-installing-utop-in-ocaml-4-06/1102/2 "2017-11-11T11:42:16Z")

</div>

In the just released `4.06` version of OCaml strings became immutable by default. Not all the packages had the time to update yet. If you are new to OCaml I suggest sticking to 4.05 for the time being.

---

<div class="post-metadata">

**Author:** ![perry](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/perry/32/518_2.png) [@perry](https://discuss.ocaml.org/u/perry)\
**Post date:** [November 11, 2017, 2:01pm UTC](https://discuss.ocaml.org/t/having-problem-when-installing-utop-in-ocaml-4-06/1102/3 "2017-11-11T14:01:49Z")

</div>

That said, after the latest package updates, I can now build utop under 4.06. (It was broken before that.) I suspect that the original poster should probably do `opam update` and it might then be possible to build it.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Kashongwe](https://avatars.discourse-cdn.com/v4/letter/j/f04885/32.png) [@Jonathan\_Kashongwe](https://discuss.ocaml.org/u/Jonathan_Kashongwe)\
**Post date:** [November 11, 2017, 10:01pm UTC](https://discuss.ocaml.org/t/having-problem-when-installing-utop-in-ocaml-4-06/1102/4 "2017-11-11T22:01:02Z")

</div>

Thanks for your answer, i just do opam update, try again and utop built successful.

---

<div class="post-metadata">

**Author:** ![perry](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/perry/32/518_2.png) [@perry](https://discuss.ocaml.org/u/perry)\
**Post date:** [November 11, 2017, 10:03pm UTC](https://discuss.ocaml.org/t/having-problem-when-installing-utop-in-ocaml-4-06/1102/5 "2017-11-11T22:03:01Z")

</div>

FYI, @dbuenzli is correct. Even though utop is now working, there are still a number of packages that don’t quite work on 4.06 yet. You may be happiest doing 4.05 for the moment.
