CentOS 7 上安裝 Elixir的教程

來源:互聯網
上載者:User

這裡介紹兩種方式。

發行版倉庫

執行 yum info elixir,我們得到:

  Available Packages
  Name        : elixir
  Arch        : noarch
  Version     : 0.12.5
  Release     : 2.el7
  Size        : 2.7 M
  Repo        : epel/x86_64
  Summary     : A modern approach to programming for the Erlang VM
  URL         : http://elixir-lang.org/
  License     : ASL 2.0 and ERPL
  Description : Elixir is a programming language built on top of the Erlang VM.
              : As Erlang, it is a functional language built to support distributed,
              : fault-tolerant, non-stop applications with hot code swapping.
從上面的資料我們可以看到,epel/x86_64 倉庫中 elixir 版本是 0.12.5,而目前(2016-08-01)官網上顯示 elixir 版本是 1.3.2。所以這個方法可以放棄。

先行編譯包

Elixir 在 github 上有提供先行編譯包,我們可以下載然後自己安裝 - 記得要先安裝 erlang。

$ cd
$ wget https://github.com/elixir-lang/elixir/archive/v1.3.2.zip
$ unzip v1.3.2.zip -d .
$ cd elixir-1.3.2
$ make
成功後,把 elixir 的路徑加入環境變數中即可:

  export PATH="$PATH:/home/sam/elixir-1.3.2/bin"
命令列下敲入:

  $ elixir -v
即可查看 elixir 是否安裝成功,及成功安裝的版本。

這裡,我把 elixir 安裝在使用者主目錄下。

此後要升級 elixir,也是按照一樣的步驟操作。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.