CentOS下源码安装Ruby及Go
安装依赖
yum install wget gcc gcc-c++ g++ autoconf autoconf2.13 automake make cmake m4 openssl openssl-devel curl libcurl-devel zlib-devel libxml2-devel gettext-devel gdbm-devel readline-devel ncurses-devel libffi-devel libyaml-devel libxslt-devel libicu-devel logrotate python-docutils krb5-devel
安装Ruby
# rpm -qa | grep -i ruby
# wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.gz
# tar -xzf ruby-2.4.1.tar.gz
# cd ruby-2.4.1/
# ./configure --prefix=/usr/local/ruby --disable-install-rdoc
# make
# make install
# ln -s /usr/local/ruby/bin/ruby /usr/bin/ruby //放在/usr/local/bin/目录下只能为当前用户识别,放在/usr/bin/目录下可以为所有用户识别
# ln -s /usr/local/ruby/bin/gem /usr/bin/gem
# ruby -v
# gem -v
# gem sources --remove https://rubygems.org/ //最好不要删除默认源
# gem sources -a https://ruby.taobao.org/ //修改ruby的源为淘宝
# gem sources -u //更新缓存
# gem sources -l //列出源
# gem install bundler --no-ri --no-doc
# ln -s /usr/local/ruby/bin/bundle /usr/bin/bundle
# bundle -v
安装Go
# wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
# tar -xzf go1.8.3.linux-amd64.tar.gz -C /usr/local/
# ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/bin/ //放在/usr/local/bin/目录下只能为当前用户识别,放在/usr/bin/目录下可以为所有用户识别,后面的git用户就要用到go
# go version
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/02/25/install-ruby-and-go-with-source-code-under-centos/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报
CentOS下源码安装Ruby及Go
安装依赖
yum install wget gcc gcc-c++ g++ autoconf autoconf2.13 automake make cmake m4 openssl openssl-devel curl libcurl-devel zlib-devel libxml2-d……
文章目录
关闭
共有 0 条评论