在Mac Big Sur上,我如何与特定版本的ocaml建立一致性? [英] On Mac Big Sur, how do i build unison with a specific version of ocaml?

查看:29
本文介绍了在Mac Big Sur上,我如何与特定版本的ocaml建立一致性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Mac OS Big Sur(11.5.6)。我已安装以下版本的ocaml(通过Opam).

$ ocaml --version
The OCaml toplevel, version 4.08.1

但是,当我通过自制软件构建unison时,它似乎使用了不同版本的ocaml.

$ brew install unison
Warning: Treating unison as a formula. For the cask, use homebrew/cask/unison
==> Downloading https://ghcr.io/v2/homebrew/core/unison/manifests/2.51.4
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/731ecb00a5b8f50a21a06345e0a9c56f0fe26cf0c3675d3f3b76eab5f093875e--unison-2.51.4.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/unison/blobs/sha256:4e0e92dbed77b5a10ccaf2ed146707fc92d1332d30
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/f7cbad912db8a26e9d39b963c8d8ef33f5772b3091540064fc1f22b294f6170c--unison--2.51.4.big_sur.bottle.tar.gz
==> Pouring unison--2.51.4.big_sur.bottle.tar.gz
🍺  /usr/local/Cellar/unison/2.51.4: 9 files, 3.5MB

然后

$ unison -version
unison version 2.51.4 (ocaml 4.12.0)
如何构建绑定到已安装的ocaml版本的unison?(我必须使用这个特定的ocaml版本,因为我正在尝试与使用相同ocaml版本4.08.1构建的Ubuntu Unison实例同步)。

编辑:针对给定的答案,以下是输出.

(venv) localhost:~ davea$ opam switch create 4.08.1
[ERROR] There already is an installed switch named 4.08.1
(venv) localhost:~ davea$ eval $(opam env)
(venv) localhost:~ davea$ opam install unison
The following actions will be performed:
  ∗ install conf-pkg-config 2       [required by conf-gtk2]
  ∗ install ocamlfind       1.9.1   [required by lablgtk]
  ∗ install dune            2.9.1   [required by unison]
  ∗ install conf-gtk2       1       [required by lablgtk]
  ∗ install lablgtk         2.18.11 [required by unison]
  ∗ install unison          2.51.4
===== ∗ 6 =====
Do you want to continue? [Y/n] n
(venv) localhost:~ davea$ opam install unison
The following actions will be performed:
  ∗ install conf-pkg-config 2       [required by conf-gtk2]
  ∗ install ocamlfind       1.9.1   [required by lablgtk]
  ∗ install dune            2.9.1   [required by unison]
  ∗ install conf-gtk2       1       [required by lablgtk]
  ∗ install lablgtk         2.18.11 [required by unison]
  ∗ install unison          2.51.4
===== ∗ 6 =====
Do you want to continue? [Y/n] Y

The following system packages will first need to be installed:
    gtk+

<><> Handling external dependencies <><><><><><><><><><><><><><><><><><><><>  🐫 
Let opam run your package manager to install the required system packages?
(answer 'n' for other options) [Y/n] Y
+ /usr/local/bin/brew "install" "gtk+"
- ==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/manifests/3.9.7
- ==> Downloading https://ghcr.io/v2/homebrew/core/python/3.9/blobs/sha256:41d99040ba87c30b59dda54f1718aa05c584c0c3e6dc366bd63589e6dfd6cb25
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:41d99040ba87c30b59dda54f1718aa05c584c0c3e6dc366bd63589e6dfd6cb25?se=2021-09-23T14%3A10%3A00Z&sig=vZ7IzeI51lHvcMcOfcXrq%2Fzi0Js0c76XJICAyrQ0INw%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/glib/manifests/2.70.0
- ==> Downloading https://ghcr.io/v2/homebrew/core/glib/blobs/sha256:7d4a5cf540591f124ee50ee8c344ba823d170946350e71559a52a0e21eb38a81
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:7d4a5cf540591f124ee50ee8c344ba823d170946350e71559a52a0e21eb38a81?se=2021-09-23T14%3A10%3A00Z&sig=8JuRVXDfoNygxKUGvnc6hutAHuvGbGFKPlNhEOIASG4%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/atk/manifests/2.36.0
- ==> Downloading https://ghcr.io/v2/homebrew/core/atk/blobs/sha256:8321e0ee7364e1de1a3667c50954b4b4f629cba7c2d8077114c4a5bc38a24655
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:8321e0ee7364e1de1a3667c50954b4b4f629cba7c2d8077114c4a5bc38a24655?se=2021-09-23T14%3A10%3A00Z&sig=WUNRZqXdIeKx9YmYYVd%2BuEOExE9j%2BzUyUe8hMHIDSPk%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/gdk-pixbuf/manifests/2.42.6
- ==> Downloading https://ghcr.io/v2/homebrew/core/gdk-pixbuf/blobs/sha256:f4cf795b20c84fb5074ceeeeaf7b1d22e164b7af13adb6d0b95e3655d867fd41
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:f4cf795b20c84fb5074ceeeeaf7b1d22e164b7af13adb6d0b95e3655d867fd41?se=2021-09-23T14%3A10%3A00Z&sig=hhcQ%2F5EFeBLzLqcpb0Afv7iJjiDcx4mbPCxvhuNLNeA%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/hicolor-icon-theme/manifests/0.17
- ==> Downloading https://ghcr.io/v2/homebrew/core/hicolor-icon-theme/blobs/sha256:f4cd50751f22d1aae6156ce3e552dbe0afb21ce1aaa5a7cc7ce284c867a20865
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:f4cd50751f22d1aae6156ce3e552dbe0afb21ce1aaa5a7cc7ce284c867a20865?se=2021-09-23T14%3A10%3A00Z&sig=PmkhRHr6vorYEgdj%2BUE74Hvt3nBfe7k%2BJobwblE9sJM%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/xorgproto/manifests/2021.5
- ==> Downloading https://ghcr.io/v2/homebrew/core/xorgproto/blobs/sha256:97763c1171ba9dc0772b5fa107c8dad9b19c3e73963d84887fb2d8c02a1ab59e
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:97763c1171ba9dc0772b5fa107c8dad9b19c3e73963d84887fb2d8c02a1ab59e?se=2021-09-23T14%3A10%3A00Z&sig=7pySREcGBElThEN5fWsusgIzGVDF2ddWqXl6QkrRhsM%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/libx11/manifests/1.7.2
- ==> Downloading https://ghcr.io/v2/homebrew/core/libx11/blobs/sha256:7aee5576a2669a20c9c0421a5afdce633130aeebe3f610c646f15dd5fe299f34
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:7aee5576a2669a20c9c0421a5afdce633130aeebe3f610c646f15dd5fe299f34?se=2021-09-23T14%3A10%3A00Z&sig=YOaeIU59FwbPrGVgu1pC%2FGUEPd2htp9Sir%2FqmYtLHJQ%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/gobject-introspection/manifests/1.70.0
- ==> Downloading https://ghcr.io/v2/homebrew/core/gobject-introspection/blobs/sha256:96e7c0007fa6a2b1d602d28761df216109f55d7e6722da1f5e04086960be6a09
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:96e7c0007fa6a2b1d602d28761df216109f55d7e6722da1f5e04086960be6a09?se=2021-09-23T14%3A10%3A00Z&sig=G3QlEMTc6GjLDFUXIdRpdMz8C%2BkQQMgoJUBrk9y0P90%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/graphite2/manifests/1.3.14
- ==> Downloading https://ghcr.io/v2/homebrew/core/graphite2/blobs/sha256:ddc468a1eec491aed5d5b05b22d0cffa38b6059d87eab747301011507fcf6366
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ddc468a1eec491aed5d5b05b22d0cffa38b6059d87eab747301011507fcf6366?se=2021-09-23T14%3A10%3A00Z&sig=W9QP7bDobJcVcDKhN8XlMqX2%2BtBqCbBex81R1BggOAE%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/manifests/3.0.0
- ==> Downloading https://ghcr.io/v2/homebrew/core/harfbuzz/blobs/sha256:578a6aa32fa88436cafddd4bce9cf3c4779f748e3c8f664b486b712550f4ece2
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:578a6aa32fa88436cafddd4bce9cf3c4779f748e3c8f664b486b712550f4ece2?se=2021-09-23T14%3A10%3A00Z&sig=BfXMcJbbmkUw1EFHsFviwbspkUI67cPQ80UjcTdiEQU%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/pango/manifests/1.48.10
- ==> Downloading https://ghcr.io/v2/homebrew/core/pango/blobs/sha256:ea25146681018c99e13404ee299f006679397c082a388c486c7a685ec8d8eca9
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ea25146681018c99e13404ee299f006679397c082a388c486c7a685ec8d8eca9?se=2021-09-23T14%3A10%3A00Z&sig=nwfoY3lC2NalHPwxW6qJDzick%2FAGd1lzxYYkZ6ak1yU%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Downloading https://ghcr.io/v2/homebrew/core/gtkx/manifests/2.24.33
- ==> Downloading https://ghcr.io/v2/homebrew/core/gtkx/blobs/sha256:8ead5b96878ad431ac3e23dc3bd20bb4eac509c63c231e594986a0fa331e157f
- ==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:8ead5b96878ad431ac3e23dc3bd20bb4eac509c63c231e594986a0fa331e157f?se=2021-09-23T14%3A10%3A00Z&sig=ujScKou3PGTD2gN0pGkJgOD%2FI7bmPtFVs3caMP8uPYE%3D&sp=r&spr=https&sr=b&sv=2019-12-12
- ==> Installing dependencies for gtk+: python@3.9, glib, atk, gdk-pixbuf, hicolor-icon-theme, xorgproto, libx11, gobject-introspection, graphite2, harfbuzz and pango
- ==> Installing gtk+ dependency: python@3.9
- ==> Pouring python@3.9--3.9.7.big_sur.bottle.tar.gz
- Error: The `brew link` step did not complete successfully
- The formula built, but is not symlinked into /usr/local
                                                         - Could not symlink bin/2to3
                                                                                     - Target /usr/local/bin/2to3
  - already exists. You may want to remove it:
                                              -   rm '/usr/local/bin/2to3'
                                                                          - 
                                                                            - To force the link and overwrite all conflicting files:
                     -   brew link --overwrite python@3.9
                                                         - 
                                                           - To list all files that would be deleted:
                                                                                                     -   brew link --overwrite --dry-run python@3.9
                                    - 
                                      - Possible conflicting files are:
                                                                       - /usr/local/bin/2to3 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/2to3
                                           - /usr/local/bin/2to3-3.9 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/2to3-3.9
                       - /usr/local/bin/idle3 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/idle3
                                                                                                            - /usr/local/bin/idle3.9 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/idle3.9
                                                                                      - /usr/local/bin/pydoc3 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/pydoc3
                                                              - /usr/local/bin/pydoc3.9 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/pydoc3.9
                                          - /usr/local/bin/python3 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
                    - /usr/local/bin/python3-config -> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3-config
            - /usr/local/bin/python3.9 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9
                                                                                                         - /usr/local/bin/python3.9-config -> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9-config
                                                                                                     - ==> /usr/local/Cellar/python@3.9/3.9.7/bin/python3 -m ensurepip
- ==> /usr/local/Cellar/python@3.9/3.9.7/bin/python3 -m pip install -v --no-deps -
- ==> Summary
- 🍺  /usr/local/Cellar/python@3.9/3.9.7: 3,080 files, 54.7MB
- ==> Installing gtk+ dependency: glib
- ==> Pouring glib--2.70.0.big_sur.bottle.tar.gz
- 🍺  /usr/local/Cellar/glib/2.70.0: 444 files, 21MB
                                                    - ==> Installing gtk+ dependency: atk
                                                                                         - ==> Pouring atk--2.36.0.big_sur.bottle.tar.gz
...
- ==> Installing imagemagick dependency: libidn
- ==> Pouring libidn--1.38.big_sur.bottle.tar.gz
- 🍺  /usr/local/Cellar/libidn/1.38: 73 files, 1MB
- ==> Installing imagemagick dependency: ghostscript
- ==> Pouring ghostscript--9.54.0.big_sur.bottle.tar.gz
- 🍺  /usr/local/Cellar/ghostscript/9.54.0: 683 files, 149.0MB
- ==> Installing imagemagick dependency: liblqr
- ==> Pouring liblqr--0.4.2_1.big_sur.bottle.1.tar.gz
- 🍺  /usr/local/Cellar/liblqr/0.4.2_1: 25 files, 174.9KB
                                                         - ==> Installing imagemagick dependency: libomp
                                                                                                        - ==> Pouring libomp--12.0.1.big_sur.bottle.tar.gz
                                           - 🍺  /usr/local/Cellar/libomp/12.0.1: 9 files, 1.5MB
                                                                                                - ==> Installing imagemagick dependency: imath
                               - ==> Pouring imath--3.1.3.big_sur.bottle.tar.gz
                                                                               - Error: The `brew link` step did not complete successfully
                           - The formula built, but is not symlinked into /usr/local
                                                                                    - Could not symlink lib/libImath.dylib
           - Target /usr/local/lib/libImath.dylib
                                                 - is a symlink belonging to ilmbase. You can unlink it:
                                                                                                        -   brew unlink ilmbase
                - 
                  - To force the link and overwrite all conflicting files:
                                                                          -   brew link --overwrite imath
                                                                                                         - 
                                                                                                           - To list all files that would be deleted:
                                      -   brew link --overwrite --dry-run imath
                                                                               - 
                                                                                 - Possible conflicting files are:
   - /usr/local/lib/libImath.dylib -> /usr/local/Cellar/ilmbase/2.5.5/lib/libImath.dylib
                                                                                        - ==> Summary
                                                                                                     - 🍺  /usr/local/Cellar/imath/3.1.3: 49 files, 920.2KB
                                            - ==> Installing imagemagick dependency: openexr
                                                                                            - ==> Pouring openexr--3.1.1.big_sur.bottle.tar.gz
                               - Error: The `brew link` step did not complete successfully
                                                                                          - The formula built, but is not symlinked into /usr/local
                                    - Could not symlink include/OpenEXR/Iex.h
                                                                             - Target /usr/local/include/OpenEXR/Iex.h
       - is a symlink belonging to ilmbase. You can unlink it:
                                                              -   brew unlink ilmbase
                                                                                     - 
                                                                                       - To force the link and overwrite all conflicting files:
                                -   brew link --overwrite openexr
                                                                 - 
                                                                   - To list all files that would be deleted:
                                                                                                             -   brew link --overwrite --dry-run openexr
                                         - 
                                           - Possible conflicting files are:
                                                                            - /usr/local/include/OpenEXR/Iex.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/Iex.h
                                                        - /usr/local/include/OpenEXR/IexBaseExc.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexBaseExc.h
                                                  - /usr/local/include/OpenEXR/IexErrnoExc.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexErrnoExc.h
                                              - /usr/local/include/OpenEXR/IexExport.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexExport.h
                                      - /usr/local/include/OpenEXR/IexForward.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexForward.h
                                - /usr/local/include/OpenEXR/IexMacros.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexMacros.h
                        - /usr/local/include/OpenEXR/IexMathExc.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexMathExc.h
                  - /usr/local/include/OpenEXR/IexMathFloatExc.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexMathFloatExc.h
                      - /usr/local/include/OpenEXR/IexMathIeeeExc.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexMathIeeeExc.h
                        - /usr/local/include/OpenEXR/IexNamespace.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexNamespace.h
                      - /usr/local/include/OpenEXR/IexThrowErrnoExc.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IexThrowErrnoExc.h
                            - /usr/local/include/OpenEXR/IlmThread.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IlmThread.h
                    - /usr/local/include/OpenEXR/IlmThreadExport.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IlmThreadExport.h
                        - /usr/local/include/OpenEXR/IlmThreadForward.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IlmThreadForward.h
                              - /usr/local/include/OpenEXR/IlmThreadMutex.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IlmThreadMutex.h
                                - /usr/local/include/OpenEXR/IlmThreadNamespace.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IlmThreadNamespace.h
                                          - /usr/local/include/OpenEXR/IlmThreadPool.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IlmThreadPool.h
                                          - /usr/local/include/OpenEXR/IlmThreadSemaphore.h -> /usr/local/Cellar/ilmbase/2.5.5/include/OpenEXR/IlmThreadSemaphore.h
                                                    - /usr/local/lib/libIex.dylib -> /usr/local/Cellar/ilmbase/2.5.5/lib/libIex.dylib
                      - /usr/local/lib/libIlmThread.dylib -> /usr/local/Cellar/ilmbase/2.5.5/lib/libIlmThread.dylib
    - ==> Summary
- 🍺  /usr/local/Cellar/openexr/3.1.1: 194 files, 5.9MB
- ==> Installing imagemagick
- ==> Pouring imagemagick--7.1.0-8.big_sur.bottle.tar.gz
- 🍺  /usr/local/Cellar/imagemagick/7.1.0-8: 799 files, 30.3MB
- Removing: /usr/local/Cellar/imagemagick/7.0.9-21... (1,480 files, 23.6MB)
- ==> Upgrading libspatialite
-   5.0.1 -> 5.0.1_1 
- ==> Installing dependencies for libspatialite: libxml2 and proj@7
- ==> Installing libspatialite dependency: libxml2
- ==> Pouring libxml2--2.9.12.big_sur.bottle.tar.gz
- 🍺  /usr/local/Cellar/libxml2/2.9.12: 280 files, 10.7MB
                                                         - ==> Installing libspatialite dependency: proj@7
                                                                                                          - ==> Pouring proj@7--7.2.1.big_sur.bottle.tar.gz
                                            - 🍺  /usr/local/Cellar/proj@7/7.2.1: 59 files, 19.2MB
- ==> Installing libspatialite
- ==> Pouring libspatialite--5.0.1_1.big_sur.bottle.tar.gz
- Error: Cannot install macvim because conflicting formulae are installed.
-   vim: because vim and macvim both install vi* binaries
- 
- Please `brew unlink vim` before continuing.
- 
- Unlinking removes a formula's symlinks from /usr/local. You can
- link the formula again after the install finishes. You can --force this
- install, but the build may fail or cause obscure side effects in the
- resulting software.
- 🍺  /usr/local/Cellar/libspatialite/5.0.1_1: 40 files, 24.6MB
- Removing: /usr/local/Cellar/libspatialite/5.0.1... (40 files, 24.6MB)
- ==> Upgrading macvim
-   8.1-151_1 -> 8.2-171_1 
[ERROR] System package install failed with exit code 1 at command:
            brew install gtk+
You can now try to get them installed manually.
When you are done: check again and continue? [Y/n] Y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
⬇ retrieved ocamlfind.1.9.1  (http://download.camlcity.org/download/findlib-1.9.1.tar.gz)
⬇ retrieved lablgtk.2.18.11  (https://github.com/garrigue/lablgtk/archive/2.18.11.tar.gz)
∗ installed conf-pkg-config.2
∗ installed conf-gtk2.1
⬇ retrieved unison.2.51.4  (https://github.com/bcpierce00/unison/archive/refs/tags/v2.51.4.tar.gz)
⬇ retrieved dune.2.9.1  (https://github.com/ocaml/dune/releases/download/2.9.1/dune-2.9.1.tbz)
∗ installed ocamlfind.1.9.1
∗ installed dune.2.9.1
∗ installed lablgtk.2.18.11
[ERROR] The compilation of unison.2.51.4 failed at "dune build -p unison -j 7".

#=== ERROR while compiling unison.2.51.4 ======================================#
# context     2.1.0 | macos/x86_64 | ocaml-base-compiler.4.08.1 | git+https://github.com/ocaml/opam-repository.git
# path        ~/.opam/4.08.1/.opam-switch/build/unison.2.51.4
# command     ~/.opam/opam-init/hooks/sandbox.sh build dune build -p unison -j 7
# exit-code   1
# env-file    ~/.opam/log/unison-92589-1f358e.env
# output-file ~/.opam/log/unison-92589-1f358e.out
### output ###
#           cc src/fsmonitor/linux/inotify_stubs.o (exit 1)
# (cd _build/default/src/fsmonitor/linux && /usr/bin/cc -O2 -fno-strict-aliasing -fwrapv -D_FILE_OFFSET_BITS=64 -D_REENTRANT -O2 -fno-strict-aliasing -fwrapv -g -I /Users/davea/.opam/4.08.1/lib/ocaml -I ../../lwt -o inotify_stubs.o -c inotify_stubs.c)
# inotify_stubs.c:22:10: fatal error: 'sys/inotify.h' file not found
# #include <sys/inotify.h>
#          ^~~~~~~~~~~~~~~
# 1 error generated.



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫 
┌─ The following actions failed
│ λ build unison 2.51.4
└─ 
┌─ The following changes have been performed
│ ∗ install conf-gtk2       1
│ ∗ install conf-pkg-config 2
│ ∗ install dune            2.9.1
│ ∗ install lablgtk         2.18.11
│ ∗ install ocamlfind       1.9.1
└─ 
# Run eval $(opam env) to update the current shell environment

The former state can be restored with:
    /usr/local/bin/opam switch import
"/Users/davea/.opam/4.08.1/.opam-switch/backup/state-20210923140118.export"

(venv) localhost:~ davea$ unison -version
unison version 2.51.4 (ocaml 4.12.0)

推荐答案

您安装的交换机不会影响HOMEBREW安装的内容,HOMEBREW使用自己的OCAML安装。您可以使用自制软件强制使用特定的ocaml版本。或从Opam安装Unison。

opam switch create 4.08.1
eval $(opam env)
opam install unison

这篇关于在Mac Big Sur上,我如何与特定版本的ocaml建立一致性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆