Unable to install rvm on mac OSX 10.8.2 - rvm

Error running 'make', please read /Users/Megha/.rvm/log/ruby-1.9.3-p374/make.log
There has been an error while running make. Halting the installation.

There is a new experimental way of dealing with dependencies in RVM => https://github.com/wayneeseguin/rvm/pull/1544 :
rvm get branch /features/improved_dependencies
rvm pkg remove
rvm remove 1.9.3
rvm install 1.9.3

You need the command lines tools (install xcode via the app store - then open it to install the command lines tools). I am talking 1Gb+ so it will take some time.
After that, get brew:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
Update and run brew to install gcc:
brew update
brew tap homebrew/dupes
brew install apple-gcc42
Then RVM and ruby 1.9.3 should work:
curl -L https://get.rvm.io | bash -s stable --rails
rvm install 1.9.3

Related

Can't install ruby 2.6.6 via rvm, error running '__rvm_make -10' on macbook pro m1

While installing the ruby 2.6.6 I'm getting this error:
Error running '__rvm_make -10'
please read /home/.rvm/log/1642694273_ruby-2.6.6/make.log
There has been an error while running make. Halting the installation.
I've tried to reinstall rvm but this changes nothing.
Other ruby versions are installed just fine.
rvm install 2.6.6 --with-out-ext=fiddle worked for me
downgrade libssl-dev with:
sudo apt install libssl-dev=1.1.1l-1ubuntu1.4
check the solution in this issue: https://github.com/rvm/rvm/issues/5209#issuecomment-1134927685
Right click Terminal from the Application/Utilities folder, Get Info, tick the "Open using Rosetta" box.
Uninstall Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
rm -rf /opt/homebrew/*
sudo rm -rf /opt/homebrew
Reinstall Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Restart terminal
Check Homebrew is working fine: brew doctor
Reinstall openssl: brew install openssl
Install Ruby: rvm install 2.5.3 Or any version
In case this helps anyone, none of the posted solutions worked on my intel MacBook Pro. brew doctor however did warn my developer tools were out of date. Uninstalling and reinstalling those allowed me to return to using RVM as normal:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

Could not find 'ffi' (>= 1.3.0) among 85 total gem(s) (Gem::MissingSpecError) React native IOS on pod install

Hi I'm trying to run my react native app on mac mini. I can run another app also this app to but when i write pod install in terminal it gives this error.
1: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/specification.rb:1449:in `block in activate_dependencies'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'ffi' (>= 1.3.0) among 85 total gem(s) (Gem::MissingSpecError)
Checked in
'GEM_PATH=/Users/xx/.gem/ruby/2.6.0:/Library/Ruby/Gems/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0', execute `gem env` for more information
I tryed a lot like this code
sudo gem pristine --all, gem pristine --all
sudo gem install -n /usr/local/bin cocoapods -v 1.8.4
delete and ini pod init/ which gave error
brew reinstall cocoapods
\curl -sSL https://get.rvm.io | bash -s stable --ruby
You can try this command
sudo gem uninstall -aIx
rm -rf ~/.gem
sudo gem install cocoapods
sudo chown -R $USER ~/Library/Caches/CocoaPods
For me, install a new version of ruby resolved this issue.
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm list known
rvm install 2.7.2
sudo gem install cocoapods
Same issue. Just updating gem package manager is works for me
gem update
Terminal will display installing 'ffi'
Successfully installed ffi-1.15.5
i solved the issue by installing the command line tool for XCode.
Just download the specific CLT from apple website
I just did a
bundle install
and that allowed me to do a pod install after upgrading (without asking me to Xcode 14).

Passenger on Apache 2 Installation fails with Your RVM wrapper scripts are too old

I'm trying to install passenger on a virtual rootserver (which has multiple user accounts) but running 'passenger-install-apache2-module' results always in the following error:
Your RVM wrapper scripts are too old. Please update them first by running 'rvm get head && rvm reload && rvm repair all'.
Following this given instructions does not take any effect.
Before installing passenger, i installed RVM as multiuser / mixed mode according to https://rvm.io//rvm/install/
After that I did (using a non root-account):
rvmsudo rvm user gemsets
rvm install 1.9.3
gem install rails
gem install passenger
and lastly passenger-install-apache2-module
I searched for hours on this problem but could not find any working solution yet.
Any suggestions ? Thanks in advance!
Try to install passenger-install-apache2-module like this :
rvmsudo passenger-install-apache2-module
I just encountered this very same issue. I'm using ZSH, but switching to Bash also failed on first attempt.
My solution was to switch to Bash with the --login flag:
/bin/bash --login
Then I noticed that my RVM ruby had become unset, so I re-set using:
rvm use ruby-1.9.3 --default
Once this was done, the following worked as expected:
passenger-install-apache2-module
Rich
I have had similar issue and have taken extreme steps on my centos 6.3 system after struggling for days! In specific, I failed to install standalone phusion passenger apache2 module on gemsets other than default and global. I have taken the following steps and now, it works for me:
Login as root (I hope you know what you're dealing with)
To completely uninstall existing rvm, invoke
[root#] rvm implode
Install stable rvm, invoke
[root#] curl -L get.rvm.io | bash -s stable
run rvm shell,
[root#] source /etc/profile.d/rvm.sh
check rvm requirements, invoke
[root#] rvm requirements
and install all requirements.
Install ruby 1.9.3, invoke
[root#] rvm install 1.9.3
Install current rubygems, invoke
rvm rubygems current
Set default to ruby 1.9.3, invoke
[root#] rvm use 1.9.3 --default
Add other users who are using rvm to rvm group, invoke
[root#] usermod -a -G rvm USERNAME
If USERNAME is currently logged in, pls logout so the group add will take effect.
Make sure rvm group added, invoke
[USERNAME#] groups
Create and Switch to a new gemset on ruby 1.9.3, invoke
[USERNAME#] rvm use 1.9.3#mygemset --create
Confirm that you're on the right gemset, invoke
[USERNAME#] rvm gemset name
Install passenger gem, invoke
gem install passenger
To skip gem documentation instead, invoke
[USERNAME#] gem install passenger --no-ri --no-rdoc
or specify them in your .gemrc file
To install apache2 mod, invoke
[USERNAME#] passenger-install-apache2-module
Hope that helps!

install ruby 1.9.3 using rvm on ubuntu [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Ruby 1.9.2 and Rails 3 cannot open rails console
I have already installed rvm and ruby 1.9.2, both working properly. Using rvm version 1.10.2. I previously installed the rvm packages readline/zlib, but now I'm having big troubles with readline now. I'm trying to install ruby 1.9.3 in rvm, but I always end up having readline not found.
I tried to follow different solutions:
rvm remove 1.9.3
rvm pkg install readline
rvm install 1.9.3 --with-readline-dir=$rvm_path/usr/ \
--with-zlib-dir=$rvm_path/usr/
rvm use 1.9.3
rvmsudo gem install bundler
bundle install (all gems installed fine)
rails c / rails s
.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/completion.rb:9:in `require': \
cannot load such file -- readline (LoadError)
I have libreadline-dev (version 6, the current one) installed (everything needed by those packages pretty much)
I also tried the following:
.rvm/src/ruby-1.9.3-p0/ext/readline]$ ruby extconf.rb
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... no
checking for readline() in -ledit... no
checking for editline/readline.h... no
.rvm/src/ruby-1.9.3-p0/ext/readline]$ ruby extconf.rb \
--with-readline-dir=/home/claudiocontin/.rvm/usr/
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... no
checking for readline() in -ledit... no
checking for editline/readline.h... no
.rvm/src/ruby-1.9.3-p0/ext/readline]$ ruby extconf.rb \
--with-readline-lib=/home/claudiocontin/.rvm/usr/
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... no
checking for readline() in -ledit... no
checking for editline/readline.h... no
Makefile is not generated of course ...
apt-get install libreadline-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libreadline-dev is already the newest version.
Ideas?
I tried to do rvm pkg readline, install ubuntu pkgs etc without any success. What worked for me:
gem install rb-readline
And add the following line to your Gemfile:
gem 'rb-readline'
What I ended up doing is remove all the libreadline from rvm usr/lib/ path.
Installed libreadline5-dev package (.deb in this case) downloaded manually, because the new ubuntu distro has only libreadline6-dev as candidate.
went to rvm ruby 1.9.3 src and:
ruby extconf.rb --with-editline-dir=/usr/ --with-readline-dir=/usr/
make
sudo make install
Now works like a charm.
Very painful stuff :)
edit:
also keep in mind that readline uses also libeditline-dev now, you can disable manually when configure ruby readline , passing: --disable-libedit
ruby extconf --disable-libedit
I've always found getting RVM to play nicely with packages to be a bit of voodoo. A lot of times, it's about catching a dependency - I put together a script that I've had luck with in past, try this:
sudo apt-get install zlib1g-dev libssl-dev libsqlite3-dev libmysqlclient-dev imagemagick librmagick-ruby libxml2-dev libxslt1-dev build-essential openssl libreadline6 libreadline6-dev zlib1g libyaml-dev libsqlite3-0 sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison libpq-dev libpq5 libmysql-ruby libmysqlclient-dev
rvm pkg install autoconf
rvm pkg install zlib
rvm pkg install readline
rvm pkg install openssl
rvm pkg install iconv
rvm install 1.9.3
rvm use 1.9.3 --default

rmagick gem install "Can't find Magick-config"

I get the error shown below when attempting to install the rmagick gem. I am on Snowleopard 10.6 using RVM, Ruby 1.9.2-head and Rails 3.05. Responses to similar questions recommended installing ImageMagick, which I successfully did. Other suggested installing the "libmagick9-dev library", however, I can not figure out how to do this.
I'm a new developer, and any assistance or directions to an existing explanation or resource is greatly appreciated. Thanks!
jjdevenuta(opal)$ gem install rmagick
Fetching: rmagick-2.13.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/Users/jjdevenuta/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in /Users/jjdevenuta/.rvm/gems/ruby-1.9.2-head#rails3/bin:/Users/jjdevenuta/.rvm/gems/ruby-1.9.2-head#global/bin:/Users/jjdevenuta/.rvm/rubies/ruby-1.9.2-head/bin:/Users/jjdevenuta/.rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/usr/X11/bin
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/jjdevenuta/.rvm/rubies/ruby-1.9.2-head/bin/ruby
UPDATE
If you're a Mac/OS X user I would HIGHLY recommend using Homebrew as your package installer/manager. You can find it HERE. Since originally asking this question I have removed all my prior installs of things like rmagick and imagemagick, and reinstalled them using Homebrew. Super easy with a huge catalog of packages, and updates/uninstalls are a cinch as well!
When building native Ruby gems, sometimes you'll get an error containing "ruby extconf.rb". This is often caused by missing development libraries for the gem you're installing, or even Ruby itself.
Do you have apt installed on your machine? If not, I'd recommend installing it, because it's a quick and easy way to get a lot of development libraries.
If you see people suggest installing "libmagick9-dev", that's an apt package that you'd install with:
$ sudo apt-get install libmagickwand-dev imagemagick
or on centOs:
$ yum install ImageMagick-devel
On Mac OS, you can use Homebrew:
$ brew install imagemagick
The new correct way is to install libmagickwand-dev:
sudo apt-get install libmagickwand-dev
Then you should be able to install rmagick no problem.
imagemagick#6 works for me!
brew unlink imagemagick
brew install imagemagick#6 && brew link imagemagick#6 --force
See this thread
Ubuntu 15.10
Note that if you try to install this gem in ubuntu 15.10, then error can happened:
Can't install RMagick 2.13.1. Can't find Magick-config in ...
All you need is preload PATH variable with additional path to ImageMagick lib.
PATH="/usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16:$PATH"
then run gem install rmagick
source of solution
UPDATE
If you're a Mac/OS X user I would HIGHLY recommend using Homebrew as your package installer/manager. You can find it HERE. Since originally asking this question I have removed all my prior installs of things like rmagick and imagemagick, and reinstalled them using Homebrew. Super easy with a huge catalog of packages, and updates/uninstalls are a cinch as well!
I finally got it working by utilizing a script for ImageMagick installation on github.
magick-installer ( https://github.com/maddox/magick-installer )
It made a fresh install of ImageMagick, and the RMagick 2.12.2 gem then installed perfectly via bundler.
Thanks to Hulihan Applications for confirming that it was most likely a missing library. I tried the suggestion of using apt-get by installing the package downloader from Fink Project. I ran the following command in terminal, but it couldn't find the libmagick9-dev libary.
$ sudo apt-get install libmagick9-dev
$ Password:
$ Reading Package Lists... Done
$ Building Dependency Tree... Done
$ E: Couldn't find package libmagick9-dev
I need to bone up on my UNIX command line skills. The original copy of ImageMagick that I installed from source is still on the machine, but I don't know where exactly or how to remove it. So much to learn...!
Things change...maybe this will help someone else:
sudo apt-get install libmagick9-dev used to work. But with a later version of imagemagick I needed:
sudo apt-get install graphicsmagick-libmagick-dev-compat libmagickcore-dev libmagickwand-dev
Try
1) apt-get install libmagickwand-dev
2) gem install rmagick
For those who don't want to do the build-from-source approach of the (otherwise excellent installer script by John Maddox, the following worked for me when installing on CentOS 6.2. (Adjust your package manager as necessary).
yum install -y {libwmf,lcms,ghostscript,ImageMagick}{,-devel}
gem install rmagick
Again, this is mainly of interest if you use your distro's package manager and would really prefer to keep it sane.
In some OS you need to use new libraries: libmagick++4 libmagick++-dev
You can use:
sudo apt-get install libmagick++4 libmagick++-dev
Important:
sudo apt-get install libmagick++4 libmagick++-dev
works on linux mint 13 after making updates:
sudo apt-get update
Can't install RMagick 2.13.2. in ubuntu 17.10
My decision
- sudo apt-get purge imagemagick libmagickcore-dev libmagickwand-dev
- sudo apt-get autoremove
- sudo rm /usr/bin/Magick-config
- sudo apt-get install imagemagick libmagickwand-dev
Version is required to correctly specify the path to the configuration
cd /usr/lib/x86_64-linux-gnu
View version ImageMagick, my version ImageMagick - 6.9.7.
cd ImageMagick-6.9.7/
ls
look at the name of the directory bin-q16 or bin-Q16
Creating a link to the config
sudo ln -s
/usr/lib/x86_64-linux-gnu/ImageMagick-version/bin-directory/Magick-config
/usr/bin/Magick-config
Creating for my version ImageMagick
- sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.9.7/bin-q16/Magick-config /usr/bin/Magick-config
- bundle
in ubuntu 15.10
sudo apt-get install graphicsmagick-libmagick-dev-compat
did the trick for me
I had to specify version 6
brew install imagemagick#6
brew link --overwrite --force imagemagick#6
If you get an error similar like:
The following packages have unmet dependencies:
libmagickwand-dev : Depends: libmagickcore4-extra (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
Depends: libmagickcore-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed
You might want to start with this package: sudo apt-get install libgvc5
For more details: https://askubuntu.com/a/230958/6506
I ran this issue twice on different machine, first time it was resolved by installing the libmagick9-dev
sudo apt-get install libmagick9-dev
and second time i have to install the following libraries.
sudo apt-get install libmagick++4 libmagick++-dev
On Mac OS X sudo port install ImageMagick turned out to work fine to fix the gem install rmagick problem . I just didn't know that it worked fine because rvm during installation blew away my .bash_profile contents which included MacPort's addition of /opt/local/bin to PATH. I put back /opt/local/bin into PATH in my .bash_profile and then my gem install rmagick then succeeded.
I had this problem when I had already installed ImageMagick with macports. I ran
port contents ImageMagick | grep config
To find where the config file had been stored and then ran
PATH=(insert your path here):${PATH} bundle
to install the gem using bundler. From now on, if you run a command that needs to reference ImageMagick, you can prefix it with that command. For example I had a migration that referenced it, so I ran
PATH=/opt/local/bin/:${PATH} rake db:migrate
opt/local/bin/ is the path where my config file was stored.
What I did to fix the problem on Ubuntu was
$ sudo apt-get install libmagickwand-dev
$ sudo apt-get install ImageMagick
Ubuntu:
sudo apt-get install imagemagick libmagickwand-dev libmagickcore-dev
gem install rmagick
CentOS:
yum remove ImageMagick
gem uninstall rmagick
yum install ImageMagick ImageMagick-devel ImageMagick-last-libs ImageMagick-c++ ImageMagick-c++-devel
gem install rmagick
MacOS:
download and install http://xquartz.macosforge.org/trac/wiki/X112.7.2
after:
brew uninstall imagemagick
brew link xz jpeg freetype
brew install imagemagick
brew link --overwrite imagemagick
gem install rmagick
execute this in terminal
sudo apt-get install libmagickcore-dev libmagickwand-dev
if its not work than
sudo ln -s /usr/lib/x86_64-linux-gnu/ImageMagick-6.8.9/bin-Q16/Magick-config /usr/local/bin/Magick-config
for reference
Installing rmagick gem in Ubuntu
sudo aptitude Install Imagemagick and GraphicsMagick(If not aptitude go & install in s/w center)
sudo aptitude Install libmagickcore-dev libmagickwand-dev
gem install rmagick -v 2.13.1
For CentOS 5/6 this is what worked for me
yum remove ImageMagick
yum install tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel
mkdir /root/imagemagick
cd /root/imagemagick
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar xzvf ImageMagick.tar.gz
cd ImageMagick-*
./configure --prefix=/usr/ --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes
make
make install
For 64 bit do this
cd /usr/lib64
ln -s ../lib/libMagickCore.so.3 libMagickCore.so.3
ln -s ../lib/libMagickWand.so.3 libMagickWand.so.3
Add the missing dependencies
yum install ImageMagick-devel
Then finally rmagick
gem install rmagick
If you need to start fresh remove other installs first with
cd /root/imagemagick/ImageMagick-*
make uninstall
On ubuntu, you also have to install imagemagick and libmagickcore-dev like this :
sudo apt-get install imagemagick libmagickcore-dev libmagickwand-dev
Everything is written in the doc.
After much digging, I fixed this on debian 8.3 using information here:
https://www.bountysource.com/issues/18142073-can-t-install-gem-on-ubuntu-15-04
Specifically:
sudo apt-get purge graphicsmagick graphicsmagick-dbg imagemagick-common imagemagick imagemagick-6.q16 libmagickcore-6-headers libmagickwand-dev
sudo apt-get autoremove
sudo apt-get install imagemagick libmagickwand-dev
gem install rmagick
Remember to ckeck the archive Gemfile.lock after the instalation.
Remove this archive and execute bundle again.
It works for me in linux :D