ubuntu 安裝home-brew.

首先仍是安裝ruby:
一、安裝所需依賴
sudo apt-get update sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev

 二、安裝git sudo apt-get install gitpython

 三、http://stackoverflow.com/questions/26595620/how-to-install-ruby-2-1-4-on-ubuntu-14-04下載rbenv 並設置好環境變量:linux



下載ruby源碼 設置環境變量git clone https://github.com/rbenv/rbenv.git ~/.rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc exec $SHELL
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc exec $SHELL 

 安裝:git

rbenv: ruby: command not foundrbenv install 2.3.1 rbenv global 2.3.1 ruby -v

rbenv --》ruby envirement 大概是這兩個單詞的縮寫,用來配置ruby的環境和安裝的

issue:
http://stackoverflow.com/questions/21275951/rbenv-ruby-command-not-found
解決辦法:在根目錄下建立一個.ruby-version文件並在裏面輸入你安裝的ruby的版本號保存。

安裝好ruby後安裝linuxbrew
參考:http://blog.csdn.net/zzhongcy/article/details/38709041
一、下載
git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew
二、配置環境變量

執行命令:vim ~/.bashrc 進入.bashrc文件的編輯狀態中後將一下兩句拷貝進去
export PATH="$HOME/.linuxbrew/bin:$PATH" export LD_LIBRARY_PATH="$HOME/.linuxbrew/lib:$LD_LIBRARY_PATH"
相關文章
相關標籤/搜索