【问题标题】:Error while installing mxnet on mac os在 mac os 上安装 mxnet 时出错
【发布时间】:2018-09-22 00:53:38
【问题描述】:

我正在尝试在我的 MacBook Pro 上安装 mxnet。他们网站上的第一步是通过键入以下内容来安装 Homebrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

在终端中。

这给了我下面的错误。

Conrados-MBP:~ conrados$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" curl:(1)libcurl中不支持或禁用协议“https”

我该如何解决这个问题?

【问题讨论】:

    标签: python curl mxnet


    【解决方案1】:

    嘿@Montmons,一切都很成功,但只有一个错误。错误说

    Error: Could not link:
    /usr/local/share/doc/homebrew
    
    Please delete these paths and run `brew update`.
    

    下面是我输入时终端的输出

    ruby -e "$(/usr/bin/curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    终端输出:

    Conrados-MBP:~ conrados$ ruby -e "$(/usr/bin/curl -fsSL 
    
    https://raw.githubusercontent.com/Homebrew/install/master/install)"
    ==> This script will install:
    /usr/local/bin/brew
    /usr/local/share/doc/homebrew
    /usr/local/share/man/man1/brew.1
    /usr/local/share/zsh/site-functions/_brew
    /usr/local/etc/bash_completion.d/brew
    /usr/local/Homebrew
    ==> The following new directories will be created:
    /usr/local/sbin
    ==> The Xcode Command Line Tools will be installed.
    
    Press RETURN to continue or any other key to abort
    ==> /usr/bin/sudo /bin/mkdir -p /usr/local/sbin
    Password:
    ==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/sbin
    ==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
    ==> /usr/bin/sudo /usr/sbin/chown conrados /usr/local/sbin
    ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/sbin
    ==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
    ==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
    ==> /usr/bin/sudo /usr/sbin/chown conrados /Library/Caches/Homebrew
    ==> Searching online for the Command Line Tools
    ==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
    ==> Installing Command Line Tools (macOS High Sierra version 10.13) for Xcode-9.3
    ==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ (macOS\ High\ Sierra\ version\ 10.13)\ for\ Xcode-9.3
    Software Update Tool
    
    
    Downloading Command Line Tools (macOS High Sierra version 10.13) for Xcode
    Downloaded Command Line Tools (macOS High Sierra version 10.13) for Xcode
    Installing Command Line Tools (macOS High Sierra version 10.13) for Xcode
    Done with Command Line Tools (macOS High Sierra version 10.13) for Xcode
    Done.
    ==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
    Password:
    ==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
    ==> Downloading and installing Homebrew...
    HEAD is now at 50059990 Merge pull request #4053 from MikeMcQuaid/string-undent-fix
    Updated 1 tap (homebrew/core).
    ==> Cleaning up /Library/Caches/Homebrew...
    ==> Migrating /Library/Caches/Homebrew to /Users/conrados/Library/Caches/Homebre
    ==> Deleting /Library/Caches/Homebrew...
    ==> New Formulae
    patchelf
    ==> Updated Formulae
    sqlite ✔            fobis               ncmpcpp             sqlite-analyzer
    afsctool            gist                nss                 wildfly-as
    apibuilder-cli      git-sizer           php                 xrootd
    cimg                jenkins             php@5.6             xtensor
    coreos-ct           jenkins-lts         php@7.0             yaws
    dbhash              knot                php@7.1
    di                  libqalculate        sops
    fibjs               maxwell             sqldiff
    Error: Could not link:
    /usr/local/share/doc/homebrew
    
    Please delete these paths and run `brew update`.
    ==> Installation successful!
    
    ==> Homebrew has enabled anonymous aggregate user behaviour analytics.
    Read the analytics documentation (and how to opt-out) here:
      https://docs.brew.sh/Analytics.html
    
    ==> Next steps:
    - Run `brew help` to get started
    - Further documentation: 
        https://docs.brew.sh
    Conrados-MBP:~ conrados$ 
    

    【讨论】:

    • Googling the error 有时会有所帮助;)。但基本上按照错误告诉您的操作:打开终端,输入rm -rf /usr/local/share/doc/homebrew 然后按enter 执行删除,然后输入brew update 并再次按回车。
    • 另外,如果答案有帮助,如果您能将其标记为已解决,那就太好了:)。
    【解决方案2】:

    从这里复制以下答案:Apple StackExchange



    我正在从 cmets 总结我的回答。

    在您的情况下,似乎某些东西已将不支持 https 的 curl 版本安装到您​​的本地文件夹中。也许您尝试自己编译它(例如,标准的.configure && make && make install 程序将程序安装到/usr/local

    您可以通过将其中的curl 替换为/usr/bin/curl 来强制命令使用系统curl,因此使用:

    ruby -e "$(/usr/bin/curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    成功安装 Homebrew 后,您可以使用以下命令在本地文件夹中重新安装 curl:

    brew install curl
    

    可能需要一些额外的步骤,因为您必须覆盖已经存在的文件。您可能需要使用--overwrite 选项。

    【讨论】:

    • 嘿@Montmons,我有最新的关于我按照你的指示发生的事情。它告诉我修复错误并删除路径。这一切都在我的回复中进行了解释。我该怎么做呢?
    猜你喜欢
    • 2021-11-12
    • 2014-12-03
    • 2015-12-10
    • 2016-02-18
    • 2011-05-16
    • 2012-01-14
    • 2011-02-25
    • 2015-12-06
    • 2011-05-08
    相关资源
    最近更新 更多