gpt4 book ai didi

ruby - 我无法通过 rvm 安装 ruby

转载 作者:太空宇宙 更新时间:2023-11-03 17:19:28 25 4
gpt4 key购买 nike

我的配置日志文件是 -

 ./configure
current path: /home/username/.rvm/src/ruby-2.1.6
PATH=/usr/local/jdk/bin:/home/username/perl5/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin:/home/username/.rvm/bin:/home/username/bin:/home/username/.rvm/bin
command(4): ./configure --prefix=/home/username/.rvm/rubies/ruby-2.1.6 --disable-install-doc --enable-shared
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/username/.rvm/src/ruby-2.1.6':
configure: error: C compiler cannot create executables
See `config.log' for more details

gcc already installed -
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)

最佳答案

我猜你没有通过 rvm 安装 ruby​​ 所需的包(依赖项)。以下步骤应该可以帮助您:

yum install gcc-c++ patch readline readline-devel zlib zlib-devel 
yum install libyaml-devel libffi-devel openssl-devel make
yum install bzip2 autoconf automake libtool bison iconv-devel
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm install 2.1.2
rvm use 2.1.2 --default

现在检查你的 ruby​​ 版本:

ruby --version

查看 http://tecadmin.net/install-ruby-2-1-on-centos-rhel/了解更多详情

关于ruby - 我无法通过 rvm 安装 ruby,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30168163/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com