Rvm install ruby-1.8.7-p334 gives the error "You passed the -clang parameter, and clang is not in your path"

Trying to use RVM on Mac OS X 10.5.8.

> rvm install ruby-1.8.7-p334 ERROR: You passed the --clang option and clang is not in your path. Please try again or do not use --clang. 

I do not know what this error is; a search in the RVM script does not lead anywhere. No luck finding this line of error. 1.8.7 is on the "known rvm list".

Has anyone seen this before?

+6
source share
5 answers

I believe the problem is this commit , in particular the changes to .rvm/scripts/env .

Editing .rvm/scripts/manage is one way to fix the problem (see flitzwald's answer for another way to do this):

  20 __rvm_check_for_clang() 21 { 22 if [[ "${rvm_clang_flag}" -eq 1 ]] && ! command -v clang >/dev/null ; then 23 rvm_error "\nYou passed the --clang option and clang is not in your path. \nPlease try again or do not use --clang.\n" 24 return 1 25 fi 26 } 

( $rvm_clang_flag set to 1 when you call it in .rvm/scripts/cli . The error is now falsely disabled because the default flag and test settings for the flag do not match.)

Edit : just a note. It was a mistake; he was . If you came here via Google, rvm get head && rvm reload , and everything should be fine.

+1
source

I don't know the solution, but it seems to be a new issue recently reported on the mailing list:

http://groups.google.com/group/rubyversionmanager/browse_thread/thread/228d9cd4cf250f68/ec09c7051c8b6e37?show_docid=ec09c7051c8b6e37

You can get around this by installing clang:

sudo apt-get install clang

But the notes say nothing about clang being a dependency, and therefore this may be the result of an error.

+4
source

So this is definitely a bug in the latest version. My advice (especially because you're not using edge Ruby) is to revert to the old version.

 rvm implode yes 

Next, use the following command to install through a specific source version:

 curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; ./rvm-installer 1.6.0 

Note. I chose v1.6.0 (currently 1.6.3). I had a similar problem and this fixed it for me ...

+4
source

If you are talking about version 1.6.3, I am experiencing the same problem and installed it to install ruby ​​1.9.2, commenting out line 506 in .rvm / scripts / selector, saying __rvm_default_flags

This function seems to set error defaults related to clang

+3
source

Just tried this - and he sorted out this problem ... BUT - you meant script editing / management, not scripts / env, I think;)

+1
source

Source: https://habr.com/ru/post/886354/


All Articles