Error running 'requirements_osx_brew_update_system ', - ruby

When I try to
$rvm requirements
I got the error :
How to recover from this (Mac osx 10.7)
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ',
please read /Users/HARSHA/.rvm/log/1380096954/update_system.log
Requirements installation failed with status: 1.
HARSHA:~ HARSHA$ rvm requirements
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ',
please read /Users/HARSHA/.rvm/log/1380096969/update_system.log
Requirements installation failed with status: 1.

I had this same error today. I opened Xcode (you might need to install this if you don't already have it, I'm not sure). Once opened I clicked Xcode --> Preferences --> Downloads and then clicked Install for the "Command Line Tools". It took about 10 minutes to install. After the install I ran $ rvm requirements again in the terminal. This change allowed the rest of the required packages to be installed. I hope this helps!

Related

How to install Homebrew Portable Ruby when your system version is too old

I'm trying to install Homebrew on macOS. Once the installation finished, when I typed help I got:
Already downloaded: /.../Library/Caches/Homebrew/portable-ruby-2.6.3.mavericks.bottle.tar.gz
Error: Checksum mismatch.
Expected: ab81211a2052ccaa6d050741c433b728d0641523d8742eef23a5b450811e5104
Actual: f80fd4cc877a64b0ac1c105fdc212ca6be08bb034118900f2c2f58edcfe0dafd
Archive: /.../Library/Caches/Homebrew/portable-ruby-2.6.3.mavericks.bottle.tar.gz
To retry an incomplete download, remove the file above.
Error: Failed to install Homebrew Portable Ruby (and your system version is too old)!
I had the same question, and the solution is simple: remove the portable-ruby-2.6.3.mavericks.bottle.tar.gz you downloaded before.
rm /.../Library/Caches/Homebrew/portable-ruby-2.6.3.mavericks.bottle.tar.gz
Try running brew update-reset in your terminal and then run brew upgrade in the same terminal.
"Homebrew install fails with Error: Failed to install Homebrew Portable Ruby" helped me tremendously.
It would fail to install, because our company firewall was blocking certain downloads, like bottle, during the Homebrew update/install, but it was difficult to determine this because I would get the error above.
After removing the file, try
brew upgrade
brew update
on your personal Wifi or your phone's hotspot.
I fixed it.
First, I deleted the brew file that stores in the Library folder when using macOS.
The failure before was due to the connection. When I make sure the connection worked, it worked.
Remove the Homebrew Portable Ruby tar.gz from your Mac using:
rm <the path.tar.gz>
rm -rf <the path.tar.gz>
I've been automating this for years. There is a new something(?) in play during the Homebrew install.
I had the same error as above. I filed an issue report and got a response that fixed my problem:
CI=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
I'm not sure what prefixing with CI=1 does but all my automation issues went away.
To retry an incomplete download, remove the file above, then run:
rm /.../Library/Caches/Homebrew/portableruby-2.6.3.mavericks.bottle.tar.gz
and try again
my problem was:
Already downloaded: ../Library/Caches/Homebrew/portable-ruby-2.6.8_1.el_capitan.bottle.tar.gz
==> Pouring portable-ruby-2.6.8_1.el_capitan.bottle.tar.gz
Error: Failed to install ruby 2.6.8_1!
Error: Failed to install Homebrew Portable Ruby (and your system version is too old)!
Fixed with opening the system app for terminal and installing Rosetta into the prompt. This happened after system update MacOS to 11.6.7
After resolving this brew did brew upgrade finish well.
Hope this helps someone.
Here is how I fixed it:
brew cleanup then brew upgrade

Error Message "Xcode alone is not sufficient on Sierra"

I'd like to install openCV to vectorize image, but there's a series error message regarding Xcode and Ruby.
First, I use terminal to install openCV, brew install opencv.
Then, I got error message indicating that the system doesn't like my ruby version.
/usr/local/Homebrew/Library/Homebrew/brew.rb:12:in `<main>':
Homebrew must be run under Ruby 2.3! You're running 2.0.0. (RuntimeError)
So, I want to upgrade my ruby. I followed several update strategy from this post. First ruby upgrade trial: brew link --overwrite ruby & brew unlink ruby && brew link ruby and get
Error: No such keg: /usr/local/Cellar/ruby
Then second ruby upgrade trial: brew upgrade ruby and see the following error message.
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install
This error message means I need to install Xcode which I already install. So, I check my Xcode status with code-select -p and get /Applications/Xcode.app/Contents/Developer which means I am fine.
I saw a comment regarding where you install python could be a big issue. Quote from the source:
If you see /usr/local/bin/python3 then you are correctly using the Homebrew version of Python. If the output is instead /usr/bin/python3 then you are incorrectly using the system version of Python.
I check which python3 and get
/Users/******/anaconda3/bin/python3
Could this be the problem? How can I change system version to local?
Let me explain this myself so people won't make the same mistakes.
When I saw the last line of the error message
Error: Xcode alone is not sufficient on Sierra.
Install the Command Line Tools:
xcode-select --install
My thought was: I already have Xcode why the system ask me to "reinstall" it. However, thanks for #SamiKuhmonen # Beartech #patrick kuang suggestion, I search a page (in Mandarin). xcode-select --install does not reinstall the whole Xcode. It means install some missing command line tools which is required by installing Ruby.
Trying to install k8s package via brew , I just got the same issue a while ago saying in the terminal :
Error: Xcode alone is not sufficient on Sierra.
Install the Command
Line Tools: xcode-select --install
You need to download *.dmg file; named Command Line Tools (macOS x.x.x) for XCode N . Search on it here : https://developer.apple.com/download/more/ . You must have developer account.
Then, congrats! 🎉
update for 2019
macOS Mojave 10.14.5
Use Xcode10.2 for macOS 10.14
I had the same issue in my Macbook Pro on Sierra. Apart from updating Xcode from the App Store, I also installed the command line utilities using the xcode-select --install command.
After the update steps, brew commands started working fine. I also updating my OS during this time.
I got the same message despite having Xcode and the command line tools already being installed a long time ago and updated numerous times.
I think it is the Apple way of telling you that Xcode command line tools need to be updated, as the App Store showed me the below:
After executing the xcode-select --install command, the update disappears from the App Store, which means they are exactly the same thing.
I had the same problem. I installed 'Command Line Tools for XCode' (choose appropriate version) from https://developer.apple.com/download/more/ and restarted my terminal. Issue resolved :)

OS X Yosemite - Vagrant: Failed to install / update plugins (ruby invalid option -H)

I've done a fresh install of OS X Yosemite and Vagrant on my Mac some days ago. The problem is, that every time when I try to update all plugins or install a vagrant plugin (vagrant-cachier), I'll get the following error:
An error occurred while installing json (1.8.2), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.2'` succeeds before bundling.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/opt/vagrant/embedded/bin/ruby extconf.rb
/opt/vagrant/embedded/bin/ruby: invalid option -H (-h will show valid options) (RuntimeError)
If I install a gem over the system's binary it works. So it seems to be a problem with the built-in vagrant binaries. I've also already installed the command line tools. My Vagrant Version is 1.7.2
I've already googled the problem for hours, but I didn't find this problem.
Did I forget anything or does anybody has a workaround for this problem?
Thanks!
Thanks for your help. I found the problem.
The problem was the path were Vagrant is installed. My SSD partition on OS X is called "Macintosh SSD" with a space in it.
I renamed it to "MacintoshSSD" and now it works fine.
The issue appears to be that the 'embedded' binary of ruby is not happy with some older code in the JSON gem. Or something... I literally know nothing about ruby other than that it is a programming language and I installed it to use compass. And now here it is again with Vagrant.
ANYWAY I moved the embedded ruby to the side, and copied OS X's built-in ruby into the vagrant embedded binaries folder.
Something like:
sudo mv /opt/vagrant/embedded/bin/ruby /opt/vagrant/embedded/bin/ruby.2.0.0.p598
sudo cp /usr/bin/ruby /opt/vagrant/embedded/bin/ruby.2.0.0.p481
sudo ln -s /opt/vagrant/embedded/bin/ruby.2.0.0.p481 /opt/vagrant/embedded/bin/ruby
sudo vagrant plugin install vagrant-vmware-fusion
Installing the 'vagrant-vmware-fusion' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vmware-fusion (3.2.1)'!
Yay.
Straight from HashiCorp... here is the troubleshooting checklist:
Hey there,
I am really sorry you are having problems installing that Vagrant plugin. We are aware of these issues, but we have not been able to narrow it down to a specific cause because it only affects a small subset of machines and we have not identified a common denominator yet.
First, please do not try and install the plugin using sudo. This can tamper with the permissions of other Vagrant plugins and cause Vagrant to error.
Second, please ensure you have the XCode Command Line Tools installed. You can install them by running:
sudo xcode-select --install
and following the on-screen prompt.
After completing those steps, many users have found success by doing the following:
Completely uninstall Vagrant
Removing the /opt/vagrant and /Applications/vagrant directories.
Remove Vagrant's storage directory (~/.vagrant.d). Warning: If you
have installed other Vagrant plugins or Vagrant plugin licenses,
they will be removed!
Reinstall Vagrant from the official Vagrant installers:
https://www.vagrantup.com/downloads.html
Install the plugin
Additionally, please ensure the following:
If there is a special character anywhere in Vagrant's path, you must
choose a different directory. This includes spaces (like in a
username or folder name) and parenthesis (like C:/Program Files
(x86)). Unfortunately there is a bug in the language in which Vagrant
is written that prohibits compiling native extensions under these
circumstances.
If you are using a Mac, please make sure you have accepted the XCode
license agreement. In some situations, native extensions will fail to
compile because XCode is prohibiting the installation due to an
unaccepted license agreement. To accept the license agreement, simply
open XCode - you will be prompted if you need to accept the
agreement.
If the problem persists after taking these steps, please provide the output of the plugin installation's debug logs.
Please let me know if you have any questions.
Best,
Seth

Ruby installation error caused by original partition - dual booting OSX Mavericks

After messing up the permissions on my original OSX installation I decided to create a new partition with a new installation of Mavericks.
All's fine until I try to install ruby and get the error
/bin/sh: /Volumes/Macintosh: No such file or directory
"/Volumes/Macintosh" is a trimmed "/Volumes/Macintosh HD" which is where the original OSX installation is on the original partition. I assume it's still required for booting.
Why is the new installation on the new partition looking at the original when trying to install Ruby, and other things, and how do I stop it?
Any help would be greatly appreciated
Thanks, Steve
Update: Installing ruby using "rvm install 2.1" gives me the error -
Error running 'requirements_osx_brew_libs_install libksba', showing last 15 lines of
/Users/bigmac/.rvm/log/1394034844_ruby-2.1.1/package_install_libksba.log
==> Downloading ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.3.0.tar.bz2
Already downloaded: /Library/Caches/Homebrew/libksba-1.3.0.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/libksba/1.3.0
==> make install
Making install in m4
/bin/sh: /Volumes/Macintosh: No such file or directory
make: *** [install-recursive] Error 1
I ended up fixing my issue after installing homebrew and running brew doctor where it told me macports could cause some issues . ( I hadn't installed macports ) It was on the system from a previous version of OSX . By uninstalling macports I was able to successfully install ruby 2.1.1 .
If that doesn't work there is also an issue if your xcode command line tools are installed in a directory whose name has spaces in it. Apparently RVM can't install ruby if there are spaces.
Don't know if it will help but it worked for me
The solution I used was to fix my original installation permissions. I did this by restarting the Mac and holding down CMD-R then selecting Reinstall OS X following the instruction here:
http://support.apple.com/kb/PH13871
The [re]installation completely restored all permissions without affecting data. Problem solved.

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