我是ruby rvm .bash_profile等的新手。我正在尝试安装ruby 1.9.3因为我需要使用一些刀命令而我无法这样做。 这是我的终端输出
BELC02LL1MLFD58:~ vananthraman$ rvm install 1.9.3
Warning! PATH is not properly set up, '/Users/vananthraman/.rvm/gems/ruby-1.9.3-p194/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p194'.
ruby-1.9.3-p547 - #removing src/ruby-1.9.3-p547..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p547.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/vananthraman/.rvm/rubies/ruby-1.9.3-p547, this may take a while depending on your cpu(s)...
ruby-1.9.3-p547 - #downloading ruby-1.9.3-p547, this may take a while depending on your connection...
ruby-1.9.3-p547 - #extracting ruby-1.9.3-p547 to /Users/vananthraman/.rvm/src/ruby-1.9.3-p547....
ruby-1.9.3-p547 - #applying patch /Users/vananthraman/.rvm/patches/ruby/GH-488.patch.
ruby-1.9.3-p547 - #configuring...............................................
ruby-1.9.3-p547 - #post-configuration.
ruby-1.9.3-p547 - #compiling............................
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/vananthraman/.rvm/log/1411536075_ruby-1.9.3-p547/make.log
bignum.c:3492:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
bignum.c:3525:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
bignum.c:3587:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
bignum.c:3636:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
bignum.c:3649:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
bignum.c:3675:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
bignum.c:3697:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
bignum.c:3710:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
bignum.c:3726:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
bignum.c:3753:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/usr/local/Cellar/gcc46/4.6.4/lib/gcc/x86_64-apple-darwin13.0.2/4.6.4/include- fixed/math.h:580:14: error: old-style parameter declarations in prototyped function definition
bignum.c:3798:1: error: expected '{' at end of input
bignum.c:3798:1: warning: control reaches end of non-void function [-Wreturn-type]
make: * [bignum.o]错误1 ++返回2 运行make时出错。停止安装。
BELC02LL1MLFD58:~ vananthraman$ gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
版权所有(C)2007 Free Software Foundation,Inc。 这是免费软件;查看复制条件的来源。没有 保证;甚至不适用于适销性或特定用途的适用性。
以下是我的.bash_profile
的内容export M2_HOME=/Users/vananthraman/apache-maven-3.2.2
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xms256m -Xmx512m"
export PATH=$M2:$PATH
export JAVA_HOME=`/usr/libexec/java_home -v 1.7`
export P4MERGE=/Applications/p4merge.app/Contents/MacOS
export P4DIFF=/Applications/p4merge.app/Contents/MacOS
export PATH=$PATH:$HOME/.rvm/bin:/usr/local/bin:/Users/vananthraman/apache-maven- 3.2.2/bin:/Applications/p4merge.app/Contents/MacOS:/Library/Frameworks/Python.framework/Versions/3.4/bin:$PATH
source ~/.rvm/scripts/rvm
source ~/.profile
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
这是我的.profile的内容 PATH =:$ HOME / .rvm / bin:$ PATH#将RVM添加到PATH以进行脚本编写