gpt4 book ai didi

ocaml - 无法使用 opam 安装 ctypes

转载 作者:行者123 更新时间:2023-12-03 06:03:18 30 4
gpt4 key购买 nike

我希望在我的 Ubuntu 14.04 计算机上安装 ctypes。我尝试使用 opam 来做到这一点,但失败了。这是我得到的回复:-

opam install ctypes
The following actions will be performed:
∗ install conf-ncurses 1 [required by ocamlfind]
∗ install ocamlfind 1.6.2 [required by ctypes]
∗ install base-bytes base [required by ctypes]
∗ install ctypes 0.5.1
===== ∗ 4 =====
Do you want to continue ? [Y/n] Y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

[ctypes] Archive in cache
[ocamlfind] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ERROR] The compilation of conf-ncurses failed at "pkg-config ncurses".

#=== ERROR while installing conf-ncurses.1 ====================================#
# opam-version 1.2.2
# os linux
# command pkg-config ncurses
# path ~/.opam/4.02.1/build/conf-ncurses.1
# compiler 4.02.1
# exit-code 1
# env-file ~/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.env
# stdout-file ~/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.out
# stderr-file ~/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.err



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions were aborted
∗ install base-bytes base
∗ install ctypes 0.5.1
∗ install ocamlfind 1.6.2
The following actions failed
∗ install conf-ncurses 1
No changes have been performed

=-=- conf-ncurses.1 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing. `opam depext conf-ncurses.1' may help you find the correct installation for your system.

我已经安装了依赖项,但仍然无法安装 ncurses。

~$ opam depext conf-ncurses.1
# Detecting depexts using flags: x86_64 linux ubuntu
# The following system packages are needed:
# - ncurses-dev
# - pkg-config
# The following new OS packages need to be installed: ncurses-dev
Not running as root, the following command will be run through "sudo":
apt-get install -qq -yy ncurses-dev
[sudo] password for ask:
# OS packages installation successful

我想知道为什么我会遇到这些问题,ncurses-dev 和 pkg-config 已经安装在我的系统上。

托比亚斯执行建议的更新:-

# Detecting depexts using flags: x86_64 linux ubuntu
# The following system packages are needed:
# - m4
# - ncurses-dev
# - pkg-config
# The following new OS packages need to be installed: ncurses-dev
Not running as root, the following command will be run through "sudo":
apt-get install -qq -yy ncurses-dev
# OS packages installation successful
The following actions will be performed:
∗ install conf-pkg-config 1.0 [required by ctypes]
∗ install conf-m4 1 [required by ocamlfind]
∗ install conf-ncurses 1 [required by ocamlfind]
∗ install ocamlfind 1.6.2 [required by ctypes]
∗ install base-bytes base [required by ctypes]
∗ install ctypes 0.5.1
===== ∗ 6 =====
Do you want to continue ? [Y/n] Y

=-=- Gathering sources =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[ctypes] Archive in cache
[ocamlfind] Archive in cache

=-=- Processing actions -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
∗ installed conf-pkg-config.1.0
∗ installed conf-m4.1
[ERROR] The compilation of conf-ncurses failed at "pkg-config ncurses".

#=== ERROR while installing conf-ncurses.1 ====================================#
# opam-version 1.2.2
# os linux
# command pkg-config ncurses
# path ~/.opam/4.03.0/build/conf-ncurses.1
# compiler 4.03.0
# exit-code 1
# env-file ~/.opam/4.03.0/build/conf-ncurses.1/conf-ncurses-10261-9b8556.env
# stdout-file ~/.opam/4.03.0/build/conf-ncurses.1/conf-ncurses-10261-9b8556.out
# stderr-file ~/.opam/4.03.0/build/conf-ncurses.1/conf-ncurses-10261-9b8556.err



=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following actions were aborted
∗ install base-bytes base
∗ install ctypes 0.5.1
∗ install ocamlfind 1.6.2
The following actions failed
∗ install conf-ncurses 1
The following changes have been performed
∗ install conf-m4 1
∗ install conf-pkg-config 1.0

=-=- conf-ncurses.1 troobleshooting -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> This package relies on external (system) dependencies that may be missing.
`opam depext conf-ncurses.1' may help you find the correct installation for
your system.

The former state can be restored with:
opam switch import "~/.opam/4.03.0/backup/state-20160410155208.export"

错误文件中仍然没有文本。

谢谢。

最佳答案

当您处理此类错误时,您可以通过查看 opam 指出的错误文件中的整个错误来获取更多详细信息,该错误文件位于此处:

cat /home/ask/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.err

请注意,这里还有经典输出:

cat /home/ask/.opam/4.02.1/build/conf-ncurses.1/conf-ncurses-3089-ccabea.out

您可能拥有可让您结束安装的其他信息。有时,depext 命令中会忘记一些 dep。

PS:我写在这里是因为我没有足够的声誉来要求评论的准确性

关于ocaml - 无法使用 opam 安装 ctypes,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37082880/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com