我正在尝试在macOS High Sierra 10.13上安装ocaml-top。我已经安装了自制软件(使用 https://brew.sh/中给出的命令(并完成了:
brew install opam
opam init
并回答Y为"你想让Opam修改~/.bash_profile和~/.ocamlinit吗"。然后:
eval `opam config env`
opam install ocaml-top
我收到以下错误
The following actions failed
∗ install conf-gtksourceview 2
No changes have been performed
=-=- conf-gtksourceview.2 troobleshooting -=-=-=-=-
=> This package relies on external (system) dependencies that may be
missing.
`opam depext conf-gtksourceview.2' may help you find the correct
installation for your system.
[编辑:在第二台Mac计算机上尝试,错误是"[错误]conf-gtksourceview的编译在"pkg-config gtksourceview-2.0"失败。
上述命令给出:
# The following system packages are needed:
# - gtksourceview
# - libxml2
# All required OS packages found.
我找到了这样的建议(例如 https://github.com/OCamlPro/ocaml-top/issues/46(:"如果你通过brew安装了gtk+,你可能需要做'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig'(自制软件("。但是,在终端中键入该或"导出 PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig"并重试无济于事。
我对此一无所知,但看起来 libgtksourceview2.0-dev 可能涉及,所以我尝试了
opam install libgtksourceview2.0-dev
但
[ERROR] No package named libgtksourceview2 found.
同样,"brew install libgtksourceview2.0-dev"或"brew install libgtksourceview"。
https://github.com/ocaml/opam-repository/issues/8449 似乎暗示此错误可能是因为其他软件包需要升级,并提到"扩展的 pkg-config --short-errors --print-errors "gtksourceview-2.0>= 2.2.0" [...]确实打印了更多信息"。我不知道这意味着什么以及如何检测哪些软件包需要升级。
你可以试试
brew install pkg-config gtksourceview libxml2
否则,运行brew search <part-of-name-of-dep>
可能有助于查找所需的依赖项。