rbenv_安装太慢_解决办法

 

    rvm做了很多“不为人知”的事情,而且做的太多了,对技术人员这点不好,技术如果不能理解原理,本身就有问题了。

    rbenv相对来说“不为人知”的事情少些。

 

rbenv:https://github.com/sstephenson/rbenv

rbenv的ruby-build:https://github.com/sstephenson/ruby-build#readme

一个插件:rbenv-pluger: https://github.com/cao7113/rbenv-pluger

 

安装方式:rbenv install 2.0.0-p111 安装过程很慢。

 

ruby-build提供了很多变量来覆盖自动安装时的包下载位置,缓存位置等。

 

Special environment variables

You can set certain environment variables to control the build process.

TMPDIR sets the location where ruby-build stores temporary files.
RUBY_BUILD_BUILD_PATH sets the location in which sources are downloaded and built. By default, this is a subdirectory of TMPDIR.
RUBY_BUILD_CACHE_PATH, if set, specifies a directory to use for caching downloaded package files.
RUBY_BUILD_MIRROR_URL overrides the default mirror URL root to one of your choosing.
RUBY_BUILD_SKIP_MIRROR, if set, forces ruby-build to download packages from their original source URLs instead of using a mirror.
CC sets the path to the C compiler.
RUBY_CFLAGS lets you pass additional options to the default CFLAGS. Use this to override, for instance, the -O3 option.
CONFIGURE_OPTS lets you pass additional options to ./configure.
MAKE lets you override the command to use for make. Useful for specifying GNU make (gmake) on some systems.
MAKE_OPTS (or MAKEOPTS) lets you pass additional options to make.
MAKE_INSTALL_OPTS lets you pass additional options to make install.
RUBY_CONFIGURE_OPTS, RUBY_MAKE_OPTS and RUBY_MAKE_INSTALL_OPTS allow you to specify configure and make options for buildling MRI. These variables will be passed to Ruby only, not any dependent packages (e.g. libyaml).

 

 

解决方法:

#1 自己下载安装包,可以利用taobao的源

#2 rbenv安装时指定刚刚下载的包

 

cd ~/.rbenv/versions
wget http://ruby.taobao.org/mirrors/ruby/2.0/ruby-2.0.0-p451.tar.gz
env RUBY_BUILD_MIRROR_URL=file:///root/.rbenv/versions/ruby-2.0.0-p451.tar.gz# rbenv install 2.0.0-p451
rbenv global 2.0.0-p451

 

 

参考:

rbenv安装太慢的解决办法

 

 

0

0

o

o

0

0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值