macos - 安装 IJulia 时出错 : Homebrew and Nettle

标签 macos homebrew julia

我最近尝试在 OS X 10.6.8 上安装 IJulia,使用 Julia v0.2.1。安装 IPython 后,我运行 Pkg.build("IJulia") 并收到以下控制台错误:

julia> Pkg.build("IJulia")
INFO: Building Homebrew
INFO: Cloning brew from https://github.com/staticfloat/homebrew.git
Cloning into '/Users/peterrichter/.julia/v0.2/Homebrew/deps/usr'...
dyld: Library not loaded: /usr/lib/libcurl.4.dylib
  Referenced from: /Applications/Julia-0.2.1.app/Contents/Resources/julia/libexec/git-core/git-remote-https
  Reason: Incompatible library version: git-remote-https requires version 7.0.0 or later, but libcurl.4.dylib provides version 6.0.0
==============================[ ERROR: Homebrew ]===============================

brew_prefix! not defined
at /Users/peterrichter/.julia/v0.2/Homebrew/src/Homebrew.jl:200
at /Users/peterrichter/.julia/v0.2/Homebrew/deps/build.jl:1

================================================================================

它似乎在提示旧版本的 libcurl(?),但是当我在终端中运行 curl -V 时,它说我正在使用curl 7.19.7。同样,执行 ipython --version 显示我正在使用 2.0.0,即 IPython 的最新版本。我是否误读了错误消息?如果是这样,我应该采取什么措施来修复它?

其他错误

除了我上面粘贴的错误文本之外,它还打印了以下内容:

INFO: Building Nettle
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps/downloads
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps/downloads already created
INFO: Downloading file http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz
INFO: Done downloading file http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps/src
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps/src already created
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps already created
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps/src/nettle-2.7.1
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps/src/nettle-2.7.1 already created
INFO: Attempting to Create directory /Users/peterrichter/.julia/v0.2/Nettle/deps/builds/nettle
INFO: Directory /Users/peterrichter/.julia/v0.2/Nettle/deps/builds/nettle already created
INFO: Changing Directory to /Users/peterrichter/.julia/v0.2/Nettle/deps/builds/nettle
checking build system type... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
checking for -R flag... none
Searching for libraries
checking /Users/peterrichter/.julia/v0.2/Nettle/deps/usr/lib... not found
checking /usr/local/lib... added
checking /sw/local/lib... not found
checking /sw/lib... not found
checking /usr/gnu/lib... not found
checking /opt/gnu/lib... not found
checking /sw/gnu/lib... not found
checking /usr/freeware/lib... not found
checking /usr/pkg/lib... not found
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/peterrichter/.julia/v0.2/Nettle/deps/builds/nettle':
configure: error: C compiler cannot create executables
See `config.log' for more details
===============================[ ERROR: Nettle ]================================

failed process: Process(`/Users/peterrichter/.julia/v0.2/Nettle/deps/src/nettle-2.7.1/configure --disable-openssl --libdir=/Users/peterrichter/.julia/v0.2/Nettle/deps/usr/lib --prefix=/Users/peterrichter/.julia/v0.2/Nettle/deps/usr`, ProcessExited(77)) [77]
at /Users/peterrichter/.julia/v0.2/Nettle/deps/build.jl:35

================================================================================
INFO: Building ZMQ
INFO: Building IJulia
Found IPython version 2.0.0 ... ok.
Creating julia profile in IPython...
(Existing KernelManager.kernel_cmd setting in ipython_config.py is untouched.)
(Existing IPythonWidget.execute_on_complete_input setting in ipython_qtconsole_config.py is untouched.)
(Existing FrontendWidget.lexer_class setting in ipython_qtconsole_config.py is untouched.)
(Existing NotebookApp.port setting in ipython_notebook_config.py is untouched.)
(Existing ipynblogo.png file untouched.)
(Existing ipynblogo.svg file untouched.)
(Existing favicon.ico file untouched.)
(Existing custom.js file untouched.)
(Existing julia.js file untouched.)

================================[ BUILD ERRORS ]================================

WARNING: Homebrew and Nettle had build errors.

 - packages with build errors remain installed in /Users/peterrichter/.julia/v0.2
 - build a package and all its dependencies with `Pkg.build(pkg)`
 - build a single package by running its `deps/build.jl` script

================================================================================

最佳答案

您似乎没有安装 C 编译器,因此 Pkg.add 在 IJulia 的某些荨麻依赖项上失败。

您的第一个错误依赖项看起来像是您的 julia 发行版的捆绑 git 实现与系统提供的库之间的链接冲突。

您可以通过 otool 准确查看 git 应用程序使用的共享库。

otool -L/Applications/Julia-0.2.1.app/Contents/Resources/julia/libexec/git-core/git-remote-https

这应该列出 git-remote-https 二进制文件链接到的 libcurl dylib 的完整路径。

您可以将其与 otool -L $(which curl) 的输出进行比较,看看它们是否链接到同一个库。

您还可以在引用的库本身上运行otool -L来查看它们的版本。这至少应该告诉您冲突是什么。您可能需要升级您的 Julia 发行版使用的 git 版本。但我不确定那里会涉及什么。我只是从源代码安装 julia,这绕过了这个特定的问题。

您可能会发现做同样的事情更容易。

关于macos - 安装 IJulia 时出错 : Homebrew and Nettle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23727496/

相关文章:

php - 如何在 MAMP 4.1 上更改 PHP 版本

package - 如何找到函数所属的包

compiler-errors - Julia : ERROR: LoadError: Failed to precompile a module after loading another one

java - 如何知道Mac中的路径中是否添加了Java?

mysql - MySQL 和 Snow Leopard 反复出现问题 - 无法锁定 ./ibdata1,错误 : 35

c++ - 更改 Mac OS X 10.9.1 w/Xcode 5 上 R Shiny 使用的 C++ 标准库(__cxa_guard_acquire 检测到死锁)

python - 如何使用 Homebrew 软件在 Cassandra 上设置 super 用户帐户?

Bash 检查是否安装了特定版本的 brew formula

python - 错误 : Failure while executing; `cp -pR/private/tmp/d20221129-9397-882a6m/ca-certificates/./usr/local/Cellar/ca-certificates` exited with 1

julia - Julia 复合类型中的参数数组长度