安装IJulia的错误:Homebrew和Nettle

时间:2014-05-18 22:26:18

标签: macos homebrew julia

我最近尝试使用Julia v0.2.1在OS X 10.6.8上安装IJulia。安装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表明我使用的是最新版本的IPython 2.0.0。我误读了错误信息吗?如果是这样,我应该采取什么措施来解决它?

其他错误

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

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

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

3 个答案:

答案 0 :(得分:2)

看起来您没有安装C编译器,因此Pkg.add在某些IJulia的nettle依赖项上失败。

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

你可以确切地看到git app与otool使用的共享库。

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,绕过了这个特殊的问题。

您可能会发现更容易做到这一点。

答案 1 :(得分:1)

对我有用的东西可能对你有所帮助: 使用最新的Anaconda免费python,从github下载windows32 exe文件并解压缩,启动julia.bat,然后在Julia命令窗口输入Pkg.add(“IJulia”),在另一个命令窗口中输入 ipython notebook --profile = julia并享受在默认浏览器(Chrome)中打开的网页! 由于--profile = julia命令部分的语法,我遇到了麻烦。

答案 2 :(得分:1)

我也使用macports而不是Homebrew。 我似乎通过将〜/ .julia / v0.3 / Nettle / deps / build.jl中的第21,22行更改为:

来解决这个问题。
libdirs = String["$(julia_usrdir)/lib"; "/opt/local/lib"]
includedirs = String["$(julia_usrdir)/include"; "/opt/local/include"]

即。我添加了macports lib并明确地包含了dirs。

有人可以通知有关当局,欢呼。