rvm install 1.9.3 on OS X 10.9.5 failing - rvm

Trying to install ruby 1.9.3 using rvm on Mac OSX 10.9.5. I've installed latest command line tools. I'm getting some weird errors with miniruby. I tried following other instructions to use clang but that didn't help:
$ rvm install 1.9.3 --with-gcc=clang
ruby-1.9.3-p547 - #removing src/ruby-1.9.3-p547..
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms.
Installing Ruby from source to: /Users/redact/.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/redact/.rvm/src/ruby-1.9.3-p547....
ruby-1.9.3-p547 - #applying patch /Users/redact/.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/redact/.rvm/log/1412548428_ruby-1.9.3-p547/make.log
-- Other runtime information -----------------------------------------------
* Loaded script: ./miniruby
* Loaded features:
0 enumerator.so
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Took a lot of research and eventually found some hints to a solution here: https://github.com/wayneeseguin/rvm/issues/1975
I had to install a different version of gcc and run rvm using that:
brew install gcc46 # wait a long long time.
CC=$( find $( brew --prefix gcc46 ) -name gcc-4.6 -perm /u+x ) rvm install 1.9.3
Hope this helps someone.

Related

gst-browser fails to start

I have just installed gst-browser (VisualGST) through the Canonical Ubuntu repositories, so I tried to start VisualGST by running gst-browser on the command line. However, I am immediately greeted with an error:
a Smalltalk Stream:2: Abandon
a Smalltalk Stream:2: Error occurred while not in byte code interpreter!!
/usr/lib/libgst.so.7(+0x74c97)[0x7fb5fa5d1c97]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20)[0x7fb5fa1aaf20]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7fb5fa1aae97]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7fb5fa1ac801]
/usr/lib/libgst.so.7(+0x2c6a6)[0x7fb5fa5896a6]
/usr/lib/x86_64-linux-gnu/libsigsegv.so.2(+0xe3c)[0x7fb5f9f68e3c]
/lib/x86_64-linux-gnu/libc.so.6(+0x3ef20)[0x7fb5fa1aaf20]
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0(g_type_check_is_value_type+0x23)[0x7fb5d4e374f3]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(+0x20785e)[0x7fb5d551185e]
/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0(gtk_list_store_new+0xa4)[0x7fb5d5436d94]
[1] 14556 abort (core dumped) gst-browser
What is the cause and meaning of the error, and how can I start VisualGST properly?
GNU Smalltalk version: 3.2.5
EDIT:
This appears to be a known issue. There's a bug report from 2012 on Launchpad: Smalltalk browser does not launch.
This appears to to be "known" issue. As I previously guessed the issue was in libraries link(age).
You can solve your issue either by installing - libgtk2.0-dev.
You can find the whole conversation here. Here is an excerpt:
Digging a bit further, I found that the module "gst-gtk-3.2.92.so" is
linked against "libgtk-x11-2.0.so", which is (now?) only provided by
package: gtk2-devel.
Your second option is to compile it from source. On Fedora 27 (again from the discussion and link above):
I'm on Fedora 27 and after a fresh install this gave me a working build:
sudo dnf install gcc git automake bison flex libtool libtool-ltdl-devel libffi-devel libsigsegv-devel cairo-devel gtk2-devel texinfo
git clone git://git.sv.gnu.org/smalltalk.git
cd smalltalk
autoreconf -vi ./configure make
sudo make install
-----------------------
For future referece you can find testing gst-browser gist.

YAML safe loading is not available

When I want to install compass with gem install compass, I occurred with this error:
YAML safe loading is not available.
Please upgrade psych to a version that supports safe loading (>= 2.0).
what The cause of this error and how can I solve the problem?
It sounds like the psych gem needs to be updated. Try running gem install psych and then gem update psych.
Suggested by looking at the psych readme file here: https://github.com/ruby/psych/blob/master/README.md
EDIT: you might also have to update your version of ruby. This depends on how you have installed ruby, but #ewerx has one suggestion in their answer.
To resolve this I first upgraded Ruby from 2.0.x to 2.4.2 (https://gorails.com/setup/osx/10.12-sierra):
rbenv install 2.4.2;
rbenv global 2.4.2
Then updated gems:
sudo gem update --system;
gem update
It may be sufficient to just update gems.
The following part of the post on https://gorails.com/setup/osx/10.12-sierra solved my issue.
We will be setting up a Ruby on Rails development environment on macOS 10.12 Sierra.
Older versions of OS X are mostly compatible so follow along as far as you can and then Google search for any problems you run into. There are plenty of people who have documented solutions for them.
Installing Homebrew
First, we need to install Homebrew. Homebrew allows us to install and compile software packages easily from source.
Homebrew comes with a very simple install script. When it asks you to install XCode CommandLine Tools, say yes.
Open Terminal and run the following command:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Installing Ruby
Choose the version of Ruby you want to install:
Now that we have Homebrew installed, we can use it to install Ruby.
We're going to use rbenv to install and manage our Ruby versions.
To do this, run the following commands in your Terminal:
brew install rbenv ruby-build
Add rbenv to bash so that it loads every time you open a terminal
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
source ~/.bash_profile
Install Ruby
rbenv install 2.5.1
rbenv global 2.5.1
ruby -v

Running into issues installing ruby 2.0 with rvm

The error I keep getting when rvm is trying to import the default gemsets, is:
ruby-2.0.0-p247 - #importing default gemsets, this may take time...............................
/Users/****/.rvm/scripts/functions/support: line 291: 84474 Segmentation fault: 11 "$ruby_path" -rrbconfig -e '\
File.open("'"$config_path"'","w") { |file|
RbConfig::CONFIG.sort.each{|key,value|
file.write("#{key.gsub(/\.|-/,"_")}=\"#{value.gsub("$","\\$")}\"\n")
}
}
' > /dev/null 2>&1
rvm -v
rvm 1.21.17 () by Wayne E. Seguin , Michal Papis [https://rvm.io/]
xcode 4.6.3
uname -a
Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
sw_vers -productVersion :10.7.5
This can be happening because this ruby was build on OSX 10.8 and this is OSX 10.7 (like mentioned in the other answer), you can make sure it's all fine with disabling binary rubies:
rvm reinstall 2.0.0 --disable-binary
this will tell rvm to not search for binary and to go straight to compile process.
If this works for you then open a ticket for rvm to prepare binaries which are compatible with OSX 10.7
Update 2013.08.06
I have removed the link to binary osx/10.7/x86_64/ruby-2.0.0-p247 - if you prefer to use binaries then please open a ticket for rvm to build version for your system.
If the code you are showing segfaults, it must be a bug in Ruby 2.0. I recommend that you submit a bug report to https://bugs.ruby-lang.org/.
I had the same problem at OS X 10.7.5
I tried: sudo rvm reinstall 2.0.0, but it fails again.
Finally I chose to install a previous version with:
sudo rvm install 1.9.3 and all its ok

install ruby on Rails in mac 10.6.8

Hi every one I try to install the last version on ruby on rails and I have several problem when run this command
\curl -L https://get.rvm.io | bash -s stable --ruby
The version of my mac is 10.6.8
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.6/i386/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Skipping `brew update` make sure your formulas are up to date.
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
Missing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libxslt, libksba, openssl, sqlite.
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
There were package installation errors, make sure to read the log.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
On OSX 10.6 instead of command line tools install:
https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.6.pkg
download this application and install it, and run again the line to install ruby, but I obtain the same error.
Any idea!
This was a known issue with rvm (see: https://github.com/wayneeseguin/rvm/issues/1671).
The issue was resolved. Install rvm separately from ruby, then try
rvm install 2.0.0 --autolibs=4
to install 2.0.0.

Missing gcc-4.0 error on pip install twisted in virtual env

I'm trying to use Scrapy inside a virtualenv, which requires installation of twisted as well. I did pip install Scrapy with no problems, but when I try pip install twisted, I'm getting the following error multiple times in the output:
unable to execute gcc-4.0: No such file or directory
error: command 'gcc-4.0' failed with exit status 1
I previously had a similar problem when trying to install python packages on my actual system, which is why I started using virtualenv in the first place. Is this an issue of the python version installed on my environment? This is what I currently have:
Django - 1.5 - active
Python - 2.7.3 - active development (/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload)
Scrapy - 0.16.4 - active
pip - 1.2.1 - active
setuptools - 0.6c11 - active
wsgiref - 0.1.2 - active development (/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7)
yolk - 0.4.3 - active
To check which version of gcc I have I typed gcc at the command line and got
i686-apple-darwin11-llvm-gcc-4.2: no input files
I tried export CC=gcc-4.2 before running pip install twisted, and I got:
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
lipo: can't figure out the architecture type of: /var/folders/s8/d0f65gc93nbchdk52g2cg5f80000gn/T//ccWQa7cJ.out
error: command 'gcc-4.2' failed with exit status 255
It sort of looks to me like it's looking for powerpc-apple-darwin11-llvm-gcc-4.2, and what I have above is i686-apple-darwin11-llvm-gcc-4.2--are these different and therefore causing the problem?
To give more background info, I installed Python 2.7 from a Python.org installer a long time ago before upgrading from Snow Leopard straight to Mountain Lion. If I simply type in python at the command line I get
Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:32:06)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
So I'm guessing that means I'm using Apple's Python? And it's built with gcc-4.0.1? So if that's the case, shouldn't I not need to do the export CC=gcc-4.2? Or do I need to do that AND switch to the Python.org version of Python? (And if the latter, how do I do that?)
Update: I tried this solution for switching Python versions but it didn't work.
Update: I managed to switch Python versions (outside of my virtualenv) using the sudo port select --set python python27 command, but this didn't solve the problem even though I'm now showing:
Python 2.7.3 (default, Nov 17 2012, 19:54:34)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
when I type python at the commmand line.
Update: I also found this solution to a question that seemed to have almost the exact same issues as I'm having, but I'm already upgraded to XCode 4.6 and definitely have the Command Line Tools installed as described in the aforementioned solution (Preferences>Downloads tab>Install Command Line Tools). I do also have XCode 3.2.6 installed, however--any chance that's causing my problems?
Have you tried CC="$(type -p clang)" pip install twisted? You don't necessarily need to use gcc to compile Twisted's extensions; selecting clang instead might clear up whatever weird problem seems to be infesting your gcc installation.
If that doesn't work, I would suggest un-installing any Python.org versions of Python and then possibly re-installing both the OS and Xcode, since it looks like something might have corrupted your system Python install. I have no idea how references to powerpc stuff have persisted into Mountain Lion, since Lion removed support for ppc.