brew軟體包管理利器

來源:互聯網
上載者:User

brew軟體包管理利器

最近編譯Spark的時候,遇到一個問題:

執行SPARK_HADOOP_VERSION=0.20.2-cdh3u5 SPARK_HIVE=true sbt/sbt assembly後,報錯:

error: Protocol https not supported or disabled in libcurl while accessing https://github.com/apache/spark.git/info/refs
fatal: HTTP request failed

是在git clone的時候出了問題,懷疑是curl不支援https,在我檢查後發現,curl是支援https的。

那就把問題定位到了,git,git在編譯的時候估計libcurl是不支援https的。

手工修複的成本太大,修複了很久,這是搜到了一篇stackoverflow討論此issues的文章:http://stackoverflow.com/questions/19015282/how-do-i-enable-https-support-in-libcurl

評論裡有人提到用brew doctor,這個只有Mac OS才有這個軟體。不過Linux平台也有移植版linuxbrew

brew是一個類似apt-get, yum 的安裝工具包。支援的特性如下:

  • Can install software to a home directory and so does not require sudo
  • Install software not packaged by the native distribution
  • Install up-to-date versions of software when the native distribution is old
  • Use the same package manager to manage both your Mac and Linux machines
    • Linuxbrew 允許將包安裝到使用者的 HOME 目錄,這樣的話,就不再 需要執行 sudo;
    • 對於在 Linux 包管理器中缺少的包,可以通過 Linuxbrew 來搞定;
    • 如果 Linux 包管理器中所帶包的版本過舊,那麼利用 Linuxbrew 能夠安裝該包的最新版本。
      一、安裝linuxbrew: 安裝就從git clone下來,然後配置環境變數如下:
      git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrewexport PATH="$HOME/.linuxbrew/bin:$PATH"export LD_LIBRARY_PATH="$HOME/.linuxbrew/lib:$LD_LIBRARY_PATH"

      二、重新安裝git: 刪除了Git,重新用linuxbrew來安裝git:
      [root@wh-8-210 shengli]# brew install git --with-brewed-curl ==> Installing dependencies for git: pkg-config, makedepend, openssl, curl==> Installing git dependency: pkg-config==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz......

      問題解決。參考: http://www.linuxeden.com/html/news/20140312/149399.html https://github.com/Homebrew/linuxbrew

      原創文章:轉載請註明出自:http://blog.csdn.net/oopsoom/article/details/39231091

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.