RVM not able to install different versions of Ruby - ruby

I've been following all the instructions on http://beginrescueend.com/rvm/install/ and http://beginrescueend.com/rvm/basics/
In the terminal I can type in "type rvm" and it says "rvm is a function" so it's supposed to have installed correctly.
Now, when I type in something like: rvm install ruby-1.9.2-p318, rvm install 1.9.2 or anything else that seems to run the install process I get the following errors
Error running 'make ', please read /Users/Nick/.rvm/log/ruby-1.9.2-p318/yaml/make.log
Error running ' ./configure --prefix=/Users/Nick/.rvm/rubies/ruby-1.9.2-p318 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/Nick/.rvm/usr ', please read /Users/Nick/.rvm/log/ruby-1.9.2-p318/configure.log
There has been an error while running configure. Halting the installation.
ls: /Users/Nick/.rvm/rubies/*/bin/ruby: No such file or directory
So I opened the install.log file and it says this:
configure: error: in `/Users/Nick/.rvm/src/yaml-0.1.4':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
There is no config.log file.

You need a C compiler and it seems you have none installed or it's not on your path. XCode provides one, have you installed it?
Check this similar question Xcode - configure: error: no acceptable C compiler found in $PATH

Looks like you need to install Xcode Command Line tools, so you can compile RVM on installation. I believe just installing Xcode will do it.

Just a sidenote: Even with XCode installed you may run into similar problem. The solution is here: Can't install Ruby under Lion with RVM – GCC issues

Related

Installing GCC on macOS Catalina

I am on macOS Catalina and trying to install GCC by following the instructions here:
https://solarianprogrammer.com/2019/10/12/compiling-gcc-macos/
Everything seems to work fine until I try to configure. Then I get the following:
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
While trying to fix this I found the following:
MacOS "configure: error: cannot run C compiled programs"
However this answer requires going to the following directory:
/Library/Developer/CommandLineTools
The problem is I do not have CommandLineTools in /Library/Developer/ not even as a hidden file. Trying to fix this I found this
How to compile GCC on macOS Catalina?
but there is now answer here and I do not have nix and don't want to mess with it as it appears to not be very compatible with macOS Catalina. So the question is how can I run the configure?
Install GCC on MacOS
learn from above vedio,i use macOX 11.1, install gcc and g++ step:
"brew install gcc", after that, check install success by: "brew info gcc".
"cd /usr/local/bin"
"ls | grep 'gcc'" should see the gcc version you install before, like: gcc-10 or g++-10.
"ln -s gcc-10 gcc" make a symlink from your gcc version to gcc.
close terminal, and open again, input "gcc -v", should see it use gcc now.
If still use clang:
make sure you logout and login again.
use "where gcc" or "which gcc" to check your gcc symlink create success.
"echo $PATH", make sure "/usr/local/bin" show before "/usr/bin" on your PATH, if not, change it on your ~/.zshrc or ~/.bashrc
First you need to install the Command-Line tools.
$ xcode-select --install
Then you probably want to install the headers from a specific .pkg in Terminal:
$ open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
(yours is 10.15, so):
$ open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.15.pkg
After finishing the installation you should have the headers you need to compile with your GCC.
Probably not the elegant answer, but it worked. I was able to find the header files needed using $(xcrun --show-sdk-path) I then copied them all to /usr/local where the gcc location was expecting them to be. Now all works.

vcftools - installing on MAC

I'm trying to install vcftools on mac. Looking at previous posts on this issue, I made sure I've got Mac OS X developer tools (http://www.cnet.com/how-to/install-command-line-developer-tools-in-os-x/). I followed the procedure recommended in the official documantion (https://vcftools.github.io/examples.html). When I run from the command line:
./configure.ac
I get the following errors:
./configure.ac: line 4: syntax error near unexpected token [2.63]'
./configure.ac: line 4:AC_PREREQ([2.63])'
If I try:
./configure
It says:
-bash: ./configure: No such file or directory
as indeed there in no ./configure when I inspect the contents with:
ls
Can anyone point out where I am doing wrong. I've tried resources such as 'homebrew' but I didn't help.
Thanks a lot.
you can download it from
git clone https://github.com/vcftools/vcftools.git
cd vcftools
you will need to install autoconf, pkg-config, libtools, automake, and zlib.
run
./autogen.sh
then
./configure
follow the instructions here: https://github.com/vcftools/vcftools
I was having the same issue. Basically you need to install automake. This can be done using
brew install automake
Check this out https://www.biostars.org/p/306802/

fontforge building in brew, terminal cant find gcc error

This is my first time trying to compile source code in terminal (I installed gimp using macPorts but this could be part of the problem...?)
I want to install fontforge and I was following these instructions how to install fontforge.
I got this warning while installing brew:
Warning: The following *evil* dylibs exist in /usr/local/lib
They may break builds or worse. You should consider deleting them:
/usr/local/lib/libssl.0.9.8.dylib
I could not find usr/local/lib and the only libssl file was in opt/local/lib called libssl.1.0.0.dylib which is supposed to be hidden apparently...
I made it to the "brew install cairo --use-clang" step, then when I try the "brew install fontforge --use-gcc" step I get the following warning:
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
==> Installing fontforge dependency: gettext
Error: GCC could not be found
when I check gcc version I get:
:~ me$ gcc --V
i686-apple-darwin11-llvm-gcc-4.2: no input files
Do I need to uninstall macports (then re-install gimp?)
I read gcc comes with xcode, I have xcode 4.3 (upgraded after this issue but didn't fix it) so do I have gcc or not? is there another way to check etc.
Can anyone tell me what I am doing wrong (what I broke etc)?
NOTE I also have flashbuilder which has a program called gcc as well (I dont know if this broke the other gcc...)

Xcode - configure: error: no acceptable C compiler found in $PATH

rebuilding a mac from scratch. Installed xcode and rvm then trying to install rubies but they are all giving me:
Error running ' ./configure --prefix=/Users/durrantm/.rvm/rubies/ruby-1.9.3-p125
--enable-shared --disable-install-doc --with-libyaml
--with-opt-dir=/Users/durrantm/.rvm/usr ',
please read /Users/durrantm/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
Michaels-MacBook-Air:~ durrantm$
The log has:
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/durrantm/.rvm/src/ruby-1.9.2-p290':
configure: error: no acceptable C compiler found in $PATH
Do I need the gcc C compliler? How do I install it ?
The critical step is actually installing the Xcode command line tools after the download completes and Xcode is installed
After downloading and installing Xcode from the app store, you need to actually install the command line tools it provides.
To do this open Xcode, go to preferences then downloads. There is an "Install" link to add the command line tools.
Once this has been completed, make sure to re-open your terminal window.
Either you install Xcode from the App store or if you have a registered free developer account you can download the XCode command line tools from http://developer.apple.com/downloads
Once you have that installed you can go ahead and install your rubies with rvm.
rbenv install error :
configure: error: in `/tmp/ruby-build.20130911002344.31969/ruby-2.0.0-p0':
configure: error: no acceptable C compiler found in $PATH
...brought me here,
I am currently installing Ruby on rails, ruby through rbenv on a brand new Debian,
Original command is :
rbenv install 2.0.0-p0
As a solution :
sudo apt-get install build-essential
Cheers !
[Sorry for the Xcode ppl]
Read rvm requirements it shows what you need to compile ruby.

Configuration issues trying to install Ruby on Mac

When I run rvm install ruby-1.9.3, I get this error message when configuring
Error running ' ./configure --prefix=/Users/robbor911/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/robbor911/.rvm/usr ', please read /Users/robbor911/.rvm/log/ruby-1.9.3-p125/configure.log
There has been an error while running configure. Halting the installation.
All posts on this issue so far tell users to download XCode and install it, but I have it installed-- it even runs successfully.
From what I've gather, my problem has something to do with the terminal unable to locate the compiler's necessary for the download.
I even managed to locate the compilers at Xcode/Contents/Developer/usr/bin and Xode/Contents/Developer/usr/llvm-gcc-4.2/bin
Does anyone know why, when I installed XCode, my compilers weren't set up properly or how I can manually correct this issue?
I just ran across this issue the other day. The way I was able to get it running:
1) I downloaded and installed this package from Github.
2) ran rvm get head && rvm reload && rvm reinstall 1.9.3
Worked for me. Running OS Lion 10.7
Xcode 4.3 no longer installs the command-line tools by default. You can install them from the Downloads pane in Xcode's preferences.

Resources