Ubuntu 12.04에 Ruby 2.0.0을 올바르게 설치하려면 어떻게해야합니까?
을 성공적으로 설치 rvm
했지만 다음 명령을 실행하면
sudo apt-get update
또는:
rvm install 2.0.0
다음과 같은 오류가 있습니다.
W: Failed to fetch http://ppa.launchpad.net/cheleb/blender-svn/ubuntu/dists/precise/main/source/Sources 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/cheleb/blender-svn/ubuntu/dists/precise/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/cheleb/blender-svn/ubuntu/dists/precise/main/binary-i386/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/ferramroberto/oneiric/ubuntu/dists/precise/main/source/Sources 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/ferramroberto/oneiric/ubuntu/dists/precise/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://ppa.launchpad.net/ferramroberto/oneiric/ubuntu/dists/precise/main/binary-i386/Packages 404 Not Found
이러한 오류를 어떻게 수정할 수 있습니까?
아래 단계를 따르십시오
sudo apt-get -y update
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p481.tar.gz
tar -xvzf ruby-2.0.0-p481.tar.gz
cd ruby-2.0.0-p481/
./configure --prefix=/usr/local
make
sudo make install
rvm
안정적인 루비를 설치하는 데 사용 :
curl -sSL https://get.rvm.io | bash -s stable --ruby
또는 이미 rvm이있는 경우 안정적인 버전을 얻으십시오.
rvm get stable
Ruby를 설치하고 특정 버전의 Ruby를 사용합니다 (로그인 셸을 사용하는 것을 잊지 마십시오).
/bin/bash --login
rvm install 2.0.0
rvm use 2.0.0
rvm rubygems latest
ruby --version
공식 RVM 웹 사이트 에서 찾을 수 있습니다 .
편집 : @prem이 처음에 이것을 실행 하고 공개 키 오류가 있으면 위의 단계를 따르십시오.
gpg --keyserver hkp://keys.gnupg.net --recv-keys \ 409B6B1796C275462A1703113804BB82D39DC0E3
rbenv
루비 설치에 사용 :
필요한 종속성을 설치하십시오.
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
설치 rbenv
:
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
Ruby 설치 :
rbenv install -v 2.0.0
From the travis-cli installation instructions for Ubuntu, the Brightbox Ruby NG(NextGeneration) ppa:
$ sudo apt-get install python-software-properties
$ sudo apt-add-repository ppa:brightbox/ruby-ng
$ sudo apt-get update
$ sudo apt-get install ruby2.1 ruby-switch
$ sudo ruby-switch --set ruby2.1
Although this answer was accepted, I would strongly recommend using rvm rather. I had nothing but trouble trying to install ruby without it. See e.g. this guide:
Any easy way to install ruby is with ruby-install. I had compile errors when building ruby from scratch, but ruby-install
encountered no such problems.
edit: I've had problems with rvm
in the past, and feel I should actively recommend against this. That's just me personally, though. I've had okay luck with rbenv
, but always use it in conjunction with ruby-install
.
You have some ppa sources enabled that aren't available for your version of Ubuntu. Comment those out in your /etc/apt/sources.list , run sudo apt-get update , and you'll be fine.
Use rbenv
The first step is to install some dependencies for 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
Installing with rbenv is a simple two step process. First you install rbenv, and then ruby-build:
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL
rbenv install 2.0.0
rbenv global 2.0.0
ruby -v
The original post on gorails.com
I put @PravinMishra's source into a Gist and now you can simply use this one liner:
wget -O - https://git.io/vvkI4 | bash
NOTE: Don't trust my Gist blindly, download the file and look into it before you run it!
참고URL : https://stackoverflow.com/questions/16222738/how-do-i-install-ruby-2-0-0-correctly-on-ubuntu-12-04
'Programing' 카테고리의 다른 글
URL 단축 웹 사이트와 같은 PHP 짧은 해시 (0) | 2020.10.11 |
---|---|
phpmyadmin 자동 로그 아웃 시간 (0) | 2020.10.11 |
화면 너비 / 높이의 백분율로 요소 크기 조정 (0) | 2020.10.11 |
Symfony2 컨트롤러에서 양식 값을 얻는 방법 (0) | 2020.10.11 |
UIImage를 200x200pt / px로 크기 조정 (0) | 2020.10.11 |