I want to install ruby 1.9.3 on Ubuntu without rvm
我想在没有rvm的情况下在Ubuntu上安装ruby 1.9.3
I run
我跑
sudo apt-get install ruby
It's taking ruby 1.8 and ruby 1.9.1.
它采用红宝石1.8和红宝石1.9.1。
And if I do
如果我这样做
sudo apt-get install ruby 1.9.3 -p XXXX
I am still not able to install ruby. How can I install ruby on Ubuntu?
我仍然无法安装ruby。如何在Ubuntu上安装ruby?
4 个解决方案
#1
25
On Ubuntu 12.04 LTS, I got it to work with the following:
在Ubuntu 12.04 LTS上,我使用以下内容:
sudo apt-get install ruby 1.9.3
cd /etc/alternatives
sudo ln -sf /usr/bin/ruby1.9.3 ruby
#2
8
Use the brightbox packages for 1.9.3. You will have to add their repo though but to keep it short here just use their help pages: http://blog.brightbox.co.uk/posts/next-generation-ruby-packages-for-ubuntu
使用1.9.3的brightbox包。您将不得不添加他们的回购,但为了简短起见,请使用他们的帮助页面:http://blog.brightbox.co.uk/posts/next-generation-ruby-packages-for-ubuntu
#3
8
1st approach
第一种方法
Source
http://lenni.info/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-04-precise-pengolin/
来源http://lenni.info/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-04-precise-pengolin/
The new Ubuntu release has just rolled around and with it a slew of new packages. Personally, I'm tracking the development of Ruby quite closely but the default Ruby on Ubuntu ist still the 1.8 series which I can't recommend. Ruby 1.9 has some performance improvements and 1.9.3 in particular a lot of them compared to 1.9.2.
新的Ubuntu版本刚刚推出并推出了大量新软件包。就个人而言,我非常密切地跟踪Ruby的开发,但默认的Ruby on Ubuntu仍然是1.8系列,我不推荐。与1.9.2相比,Ruby 1.9有一些性能改进,特别是1.9.3。
However, as I have elaborated in a previous post getting the Ruby 1.9 series on Ubuntu without using RVM instead of 1.8 isn't all that easy. Please read the post if you are interested in the details.
但是,正如我在前一篇文章中详细阐述的那样,在Ubuntu上使用RVM而不是使用RVM获取Ruby 1.9系列并不是那么容易。如果您对详细信息感兴趣,请阅读帖子。
The short version is: You can get Ruby 1.9.3-p0 by installing the ruby-1.9.1 package. (The package is called 1.9.1 because that is the ABI version.)
简短版本是:您可以通过安装ruby-1.9.1软件包获得Ruby 1.9.3-p0。 (该包名为1.9.1,因为这是ABI版本。)
If you want to make Ruby 1.9 the default do the following:
如果您想使Ruby 1.9成为默认值,请执行以下操作:
sudo apt-get update
sudo apt-get install ruby1.9.1 ruby1.9.1-dev \
rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 \ build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \
/usr/share/man/man1/ruby1.9.1.1.gz \
--slave /usr/bin/ri ri /usr/bin/ri1.9.1 \
--slave /usr/bin/irb irb /usr/bin/irb1.9.1 \
--slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1
# choose your interpreter
# changes symlinks for /usr/bin/ruby , /usr/bin/gem
# /usr/bin/irb, /usr/bin/ri and man (1) ruby
sudo update-alternatives --config ruby
sudo update-alternatives --config gem
# now try
ruby --version
If you want to make this your exclusive Ruby and get rid of Ruby 1.8 follow the uninstallation instructions.
如果你想让它成为你的独家Ruby并摆脱Ruby 1.8,请按照卸载说明进行操作。
Edit: I found out today that there also is a package called ruby1.9.3 however that is just a proxy package that doesn't have any files itself and only depends on ruby1.9.1. Aptitude confirms this:
编辑:我今天发现还有一个名为ruby1.9.3的软件包,但这只是一个代理软件包,它本身没有任何文件,只依赖于ruby1.9.1。能力证实了这一点:
Ruby uses two parallel versioning schemes: the `Ruby library compatibility version' (1.9.1 for this package), which is similar to a library SONAME, and the 'Ruby version' (1.9.3 for this package). Ruby packages in Debian are named using the Ruby library compatibility version, which is sometimes confusing for users who do not follow Ruby development closely. This package depends on the ruby1.9.1 package, and provides compatibility symbolic links from 1.9.3 executables and manual pages to their 1.9.1 counterparts.
Ruby使用两种并行版本控制方案:“Ruby库兼容版本”(此软件包为1.9.1),类似于库SONAME,以及“Ruby版本”(此软件包为1.9.3)。 Debian中的Ruby包是使用Ruby库兼容版本命名的,对于那些不密切关注Ruby开发的用户来说,这有时会让人感到困惑。此程序包依赖于ruby1.9.1程序包,并提供从1.9.3可执行文件和手册页到1.9.1对应程序的兼容性符号链接。
There doesn't seem to be a rubygems1.9.3.
似乎没有rubygems1.9.3。
2nd approach
第二种方法
Also This link i found useful its very simple and effective.
此链接我发现有用它非常简单和有效。
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
#4
4
Compiling from Source is the standard way.
从Source编译是标准方法。
Download source code from Here, Use README file to get instruction.
从Here下载源代码,使用README文件获取指令。
Another method is apt package manager system.
另一种方法是apt包管理器系统。
$ sudo apt-get install ruby1.9.1
Yes, this will install Ruby 1.9.2. It has a ‘library compatibility version’ of 1.9.1, hence the name.
是的,这将安装Ruby 1.9.2。它有一个1.9.1的“库兼容版本”,因此得名。
If you install the ‘ruby’ package, you’ll get the older Ruby 1.8.
如果您安装'ruby'软件包,您将获得较旧的Ruby 1.8。
#1
25
On Ubuntu 12.04 LTS, I got it to work with the following:
在Ubuntu 12.04 LTS上,我使用以下内容:
sudo apt-get install ruby 1.9.3
cd /etc/alternatives
sudo ln -sf /usr/bin/ruby1.9.3 ruby
#2
8
Use the brightbox packages for 1.9.3. You will have to add their repo though but to keep it short here just use their help pages: http://blog.brightbox.co.uk/posts/next-generation-ruby-packages-for-ubuntu
使用1.9.3的brightbox包。您将不得不添加他们的回购,但为了简短起见,请使用他们的帮助页面:http://blog.brightbox.co.uk/posts/next-generation-ruby-packages-for-ubuntu
#3
8
1st approach
第一种方法
Source
http://lenni.info/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-04-precise-pengolin/
来源http://lenni.info/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-04-precise-pengolin/
The new Ubuntu release has just rolled around and with it a slew of new packages. Personally, I'm tracking the development of Ruby quite closely but the default Ruby on Ubuntu ist still the 1.8 series which I can't recommend. Ruby 1.9 has some performance improvements and 1.9.3 in particular a lot of them compared to 1.9.2.
新的Ubuntu版本刚刚推出并推出了大量新软件包。就个人而言,我非常密切地跟踪Ruby的开发,但默认的Ruby on Ubuntu仍然是1.8系列,我不推荐。与1.9.2相比,Ruby 1.9有一些性能改进,特别是1.9.3。
However, as I have elaborated in a previous post getting the Ruby 1.9 series on Ubuntu without using RVM instead of 1.8 isn't all that easy. Please read the post if you are interested in the details.
但是,正如我在前一篇文章中详细阐述的那样,在Ubuntu上使用RVM而不是使用RVM获取Ruby 1.9系列并不是那么容易。如果您对详细信息感兴趣,请阅读帖子。
The short version is: You can get Ruby 1.9.3-p0 by installing the ruby-1.9.1 package. (The package is called 1.9.1 because that is the ABI version.)
简短版本是:您可以通过安装ruby-1.9.1软件包获得Ruby 1.9.3-p0。 (该包名为1.9.1,因为这是ABI版本。)
If you want to make Ruby 1.9 the default do the following:
如果您想使Ruby 1.9成为默认值,请执行以下操作:
sudo apt-get update
sudo apt-get install ruby1.9.1 ruby1.9.1-dev \
rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 \ build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev
sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \
--slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \
/usr/share/man/man1/ruby1.9.1.1.gz \
--slave /usr/bin/ri ri /usr/bin/ri1.9.1 \
--slave /usr/bin/irb irb /usr/bin/irb1.9.1 \
--slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1
# choose your interpreter
# changes symlinks for /usr/bin/ruby , /usr/bin/gem
# /usr/bin/irb, /usr/bin/ri and man (1) ruby
sudo update-alternatives --config ruby
sudo update-alternatives --config gem
# now try
ruby --version
If you want to make this your exclusive Ruby and get rid of Ruby 1.8 follow the uninstallation instructions.
如果你想让它成为你的独家Ruby并摆脱Ruby 1.8,请按照卸载说明进行操作。
Edit: I found out today that there also is a package called ruby1.9.3 however that is just a proxy package that doesn't have any files itself and only depends on ruby1.9.1. Aptitude confirms this:
编辑:我今天发现还有一个名为ruby1.9.3的软件包,但这只是一个代理软件包,它本身没有任何文件,只依赖于ruby1.9.1。能力证实了这一点:
Ruby uses two parallel versioning schemes: the `Ruby library compatibility version' (1.9.1 for this package), which is similar to a library SONAME, and the 'Ruby version' (1.9.3 for this package). Ruby packages in Debian are named using the Ruby library compatibility version, which is sometimes confusing for users who do not follow Ruby development closely. This package depends on the ruby1.9.1 package, and provides compatibility symbolic links from 1.9.3 executables and manual pages to their 1.9.1 counterparts.
Ruby使用两种并行版本控制方案:“Ruby库兼容版本”(此软件包为1.9.1),类似于库SONAME,以及“Ruby版本”(此软件包为1.9.3)。 Debian中的Ruby包是使用Ruby库兼容版本命名的,对于那些不密切关注Ruby开发的用户来说,这有时会让人感到困惑。此程序包依赖于ruby1.9.1程序包,并提供从1.9.3可执行文件和手册页到1.9.1对应程序的兼容性符号链接。
There doesn't seem to be a rubygems1.9.3.
似乎没有rubygems1.9.3。
2nd approach
第二种方法
Also This link i found useful its very simple and effective.
此链接我发现有用它非常简单和有效。
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/
#4
4
Compiling from Source is the standard way.
从Source编译是标准方法。
Download source code from Here, Use README file to get instruction.
从Here下载源代码,使用README文件获取指令。
Another method is apt package manager system.
另一种方法是apt包管理器系统。
$ sudo apt-get install ruby1.9.1
Yes, this will install Ruby 1.9.2. It has a ‘library compatibility version’ of 1.9.1, hence the name.
是的,这将安装Ruby 1.9.2。它有一个1.9.1的“库兼容版本”,因此得名。
If you install the ‘ruby’ package, you’ll get the older Ruby 1.8.
如果您安装'ruby'软件包,您将获得较旧的Ruby 1.8。