I just tried an 'opam upgrade' and got (the final summary):
1 to install | 59 to reinstall | 3 to upgrade | 34 to downgrade | 0 to remove
Do you want to continue ? [Y/n]
Downgrading 34 packages makes me nervous. Why would it want to do this?
Some examples of packages it wanted to downgrade:
- downgrade llvm.3.2 to 3.1
- downgrade ocamlfind.1.4.0 to 1.3.3 [required by bitstring, camltc, ezjsonm, fat-filesystem, google-drive-ocamlfuse, merlin, mirage-block-xen, mirage-console-xen, mirari, utop]
- downgrade SPOC.130624 to 121217
- downgrade bitstring.2.0.4 to 2.0.3
downgrade camlzip.1.05 to 1.04 [required by google-drive-ocamlfuse]
downgrade ezjsonm.0.2.0 to 0.1.0
- downgrade gapi-ocaml.0.2.1 to 0.2 [required by google-drive-ocamlfuse]
- downgrade merlin.1.5 to 1.3
- downgrade utop.1.10 to 1.9
Of course, this makes me kind of nervous, so I answered 'n'. Anyway to fix this?
opam version is 1.1.0.
EDIT: I figured I may as well post the whole result:
$ opam upgrade
*The brute-force exploration algorithm timed-out [108 states, 5s].
You might need to add explicit version constraints to your request to get a better answer.*
The following actions will be performed:
- install obuild.0.0.2 [required by mirari]
- downgrade llvm.3.2 to 3.1
- downgrade ocamlfind.1.4.0 to 1.3.3 [required by bitstring, camltc, ezjsonm, fat-filesystem, google-drive-ocamlfuse, merlin, mirage-block-xen, mirage-console-xen, mirari, utop]
- downgrade SPOC.130624 to 121217
- downgrade bitstring.2.0.4 to 2.0.3
- downgrade camlzip.1.05 to 1.04 [required by google-drive-ocamlfuse]
- recompile camomile.0.8.5 [use ocamlfind]
- recompile cmdliner.0.9.2 [use ocamlfind]
- downgrade cryptokit.1.9 to 1.6 [required by google-drive-ocamlfuse]
- recompile dypgen.20120619-1 [use ocamlfind]
- recompile easy-format.1.0.1 [use ocamlfind]
- recompile extlib-compat.1.6.1 [use ocamlfind]
- downgrade fd-send-recv.1.0.1 to 1.0.0 [required by mirari]
- downgrade herelib.109.35.02 to 109.35.00 [required by fat-filesystem, mirage-block-xen, mirage-console-xen]
- recompile ipaddr.1.0.0 [use ocamlfind]
- recompile lablgtk.2.16.0 [use ocamlfind]
- recompile menhir.20130912 [use ocamlfind]
- recompile mirage-types.1.0.0 [use ocamlfind]
- recompile ocamlfuse.2.7.1-cvs [use ocamlfind]
- downgrade ocurl.0.6.0 to 0.5.5 [required by google-drive-ocamlfuse]
- recompile omake.0.9.8.6-0.rc1 [use ocamlfind]
- recompile omd.0.9.0 [use ocamlfind]
- recompile optcomp.1.5 [use ocamlfind]
- downgrade ounit.2.0.0 to 1.1.2 [required by camltc, fat-filesystem, mirage-block-xen, mirage-console-xen]
- recompile parmap.1.0-rc3 [use ocamlfind]
- recompile pipebang.109.28.02 [use ocamlfind]
- recompile re.1.2.1 [use ocamlfind]
- recompile react.0.9.4 [use ocamlfind]
- downgrade res.4.0.4 to 3.2.0 [required by fat-filesystem, mirage-block-xen, mirage-console-xen]
- recompile sqlite3-ocaml.2.0.5 [use ocamlfind]
- recompile ssl.0.4.6 [use ocamlfind]
- downgrade type_conv.109.53.02 to 109.53.00 [required by fat-filesystem, mirage-block-xen, mirage-console-xen]
- recompile ulex.1.1 [use ocamlfind]
- recompile uutf.0.9.3 [use ocamlfind]
- downgrade xmlm.1.2.0 to 1.1.1 [required by google-drive-ocamlfuse]
- downgrade biniou.1.0.6 to 1.0.5 [required by google-drive-ocamlfuse, merlin]
- recompile tuntap.0.7.0 [use ocamlfind]
- recompile ocamldot.1.0 [use ocamlfind]
- recompile ocamlgraph.1.8.3 [use ocamlfind]
- recompile mirage-clock-unix.1.0.0 [use ocamlfind]
- recompile mirage-clock-xen.1.0.0 [use ocamlfind]
- downgrade camlimages.4.1.1 to 4.0.1
- downgrade ocplib-endian.0.4 to 0.3 [required by fat-filesystem, mirage-block-xen, mirage-console-xen]
- downgrade uri.1.3.11 to 1.3.10
- recompile zed.1.2 [use ocamlfind]
- downgrade lwt.2.4.4 to 2.4.3 [required by camltc, fat-filesystem, mirage-block-xen, mirage-console-xen, utop]
- recompile ocamlnet.3.7.3 [use ocamlfind]
- recompile bin_prot.109.53.02 [use ocamlfind]
- recompile comparelib.109.27.02 [use ocamlfind]
- recompile dyntype.0.9.0 [use ocamlfind]
- downgrade fieldslib.109.20.02 to 109.20.00 [required by fat-filesystem, mirage-block-xen, mirage-console-xen]
- recompile pa_ounit.109.53.02 [use ocamlfind]
- downgrade sexplib.109.55.02 to 109.55.00 [required by fat-filesystem, mirage-block-xen, mirage-console-xen]
- downgrade variantslib.109.15.02 to 109.15.00 [required by fat-filesystem, mirage-block-xen, mirage-console-xen]
- recompile jsonm.0.9.1 [use ocamlfind]
- downgrade yojson.1.1.6 to 1.0.3 [required by google-drive-ocamlfuse, merlin]
- downgrade mirari.0.9.7 to 0.9.3
- recompile patoline.0.1 [use ocamlfind]
- upgrade camltc.0.8.1 to 0.8.2
- downgrade lambda-term.1.5 to 1.4 [required by utop]
- recompile cow.0.9.1 [use ocamlfind]
- recompile pa_bench.109.55.02 [use ocamlfind]
- recompile custom_printf.109.27.02 [use ocamlfind]
- recompile typerep.109.55.02 [use ocamlfind]
- downgrade ezjsonm.0.2.0 to 0.1.0
- downgrade gapi-ocaml.0.2.1 to 0.2 [required by google-drive-ocamlfuse]
- downgrade merlin.1.5 to 1.3
- downgrade utop.1.10 to 1.9
- recompile core_kernel.109.55.02 [use ocamlfind]
- downgrade google-drive-ocamlfuse.0.5.2 to 0.4.4
- recompile pa_test.109.53.02 [use ocamlfind]
- recompile core.109.55.02 [use ocamlfind]
- recompile async_core.109.55.02 [use ocamlfind]
- recompile async_unix.109.55.02 [use ocamlfind]
- recompile async_extra.109.55.02 [use ocamlfind]
- recompile async.109.53.02 [use ocamlfind]
- recompile cstruct.1.0.1 [use ocamlfind]
- recompile gen_server.2.0.1 [use ocamlfind]
- upgrade cohttp.0.9.14 to 0.9.16
- recompile io-page-unix.0.9.9 [use ocamlfind]
- recompile io-page-xen.0.9.9 [use ocamlfind]
- recompile mirage-fs-unix.1.0.0 [use ocamlfind]
- downgrade shared-memory-ring.1.0.0 to 0.4.3 [required by mirage-block-xen, mirage-console-xen]
- recompile xenstore.1.2.5 [use ocamlfind]
- recompile cowabloga.0.0.3 [use ocamlfind]
- recompile mirage-http-unix.1.0.0 [use ocamlfind]
- downgrade mirage-block-unix.1.2.0 to 1.1.0 [required by fat-filesystem]
- recompile mirage-net-unix.1.0.0 [use ocamlfind]
- upgrade mirage.1.0.3 to 1.0.4
- recompile mirage-unix.1.0.0 [use ocamlfind]
- recompile mirage-xen.1.0.0 [use ocamlfind]
- downgrade fat-filesystem.0.10.0 to 0.6.2
- recompile mirage-console-unix.1.0.0 [use ocamlfind]
- recompile mirage-tcpip-unix.0.9.5 [use ocamlfind]
- downgrade mirage-block-xen.1.0.0 to 0.4.0
- downgrade mirage-console-xen.1.0.1 to 1.0.0
- recompile mirage-www.1.0.0 [use ocamlfind]
1 to install | 59 to reinstall | 3 to upgrade | 34 to downgrade | 0 to remove
Do you want to continue ? [Y/n]
Long story short: OPAM has a very expressive language for dependencies that several solvers understand. The small, simple solver included in OPAM by default is a bit of a hack that has these kind of terrible behaviors when pushed around too hard. At this point, you should install an external solver such as aspcud
that will do a better job.
More details in a long mail of Roberto Di Cosmo to the caml-list last month:
Quick fix: give the solver more time
export OPAMSOLVERTIMEOUT=60
and try again: opam upgrade
To add to gasche's answer: Setup for an external dependency solver is described on the CUDF Solver Farm
Edit: If you're experiencing this with opam version 1.1.1, try upgrading to a more recent version. My similar problem was solved by the upgrade.
来源:https://stackoverflow.com/questions/21594555/opam-upgrade-wants-to-downgrade-a-bunch-of-packages