Rvm install rubi 2.1.2 Compile from source error debian 8 x64 - ruby

Rvm install ruby 2.1.2, No binary rubies available, it try compile error stack:
`rvm install 2.1.2`
error: ossl_ssl.c:115:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
Makefile:280: recipe for target 'ossl_ssl.o' failed
make[2]: *** [ossl_ssl.o] Error 1
make[2]: *** Attente des tâches non terminées....
make[2]: Leaving directory '/home/jules/.rvm/src/ruby-2.1.1/ext/openssl'
exts.mk:187: recipe for target 'ext/openssl/all' failed
make[1]: *** [ext/openssl/all] Error 2
make[1]: Leaving directory '/home/jules/.rvm/src/ruby-2.1.1'
uncommon.mk:180: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2
pastbin stack

Try rvm pkg install openssl
This should install the openssl dependencies that rvm cannot find to $HOME/.rvm/usr.
Then you can install ruby with rvm with the following:
rvm install 2.1.2 --with-openssl-dir=$HOME/.rvm/usr

Related

Install gem em-websocket failed

uilding native extensions. This could take a while...
ERROR: Error installing em-websocket:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/usr/bin/ruby2.3 -r ./siteconf20180102-2602-1tzoncz.rb extconf.rb
creating Makefile
current directory: /var/lib/gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
sh: 1: make: not found
current directory: /var/lib/gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
sh: 1: make: not found
make failed, exit code 127
Gem files will remain installed in /var/lib/gems/2.3.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/http_parser.rb-0.6.0/gem_make.out
Looks like the error make: not found, which means the make program is missing.
You can fix it by running this command sudo apt-get install build-essential

miniruby Permission denied Error occurred when installing ruby 2.3.1 using rbenv installed homebrew

I got error message when installing ruby 2.3.1 using rbenv.
My environment is below.
MacOS 10.10.5
rbenv 1.0.0
The log message is below.
$ rbenv install 2.3.1
...
Last 10 log lines:
compiling enc/unicode.c
compiling enc/utf_8.c
compiling enc/trans/newline.c
linking miniruby
generating encdb.h
make: ./miniruby: Permission denied
make: ./miniruby: Permission denied
make: *** [.rbconfig.time] Error 1
make: *** Waiting for unfinished jobs....
make: *** [encdb.h] Error 1
If you get the same error, would you please tell me how to solve this error?
Thank you for your help.
Accepted answer is not a good answer - the install process should not require root privileges, and may lead to problems installing gems that require C extensions in the future (nokogiri is a good example).
It's a documented bug in the ruby-build package: https://github.com/rbenv/ruby-build/issues/992, the workaround is to navigate into the working directory and run make install yourself - which should run if you have XCode command line tools installed and updated.
add sudo before the command(To give the admin permission to install)
ex)sudo make ruby 2.3.1

Gem::Ext::BuildError: ERROR: Failed to build gem native extension - Segmentation fault: 11

I am using
ruby 1.9.3p547 (2014-05-14 revision 45962)
Rails 4.1.6
when I try to upgrade bcrypt
gem install bcrypt -v '3.1.9
or
gem install bcrypt
I am getting an error
make
compiling bcrypt_ext.c
make: *** [bcrypt_ext.o] Segmentation fault: 11
make failed, exit code 2
Any thoughts how to fix that please?
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/igor/.rvm/rubies/ruby-1.9.3-p547/bin/ruby extconf.rb
creating Makefile
make clean
make
compiling bcrypt_ext.c
make: *** [bcrypt_ext.o] Segmentation fault: 11
make failed, exit code 2
Gem files will remain installed in /Users/igor/.rvm/gems/ruby-1.9.3-p547/gems/bcrypt-3.1.9 for inspection.
Results logged to /Users/igor/.rvm/gems/ruby-1.9.3-p547/extensions/x86_64-darwin-13/1.9.1/bcrypt-3.1.9/gem_make.out
An error occurred while installing bcrypt (3.1.9), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.9'` succeeds before bundling.

error occurred while installing crypt (3.1.7)

I have an error message while running sudo bundle install:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/util.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt.c
compiling crypt_blowfish.c
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [bcrypt_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/bcrypt-3.1.7/gem_make.out
An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling.
Then I tried to run sudo gem install bcrypt -v '3.1.7' and have below error message:
Building native extensions. This could take a while...
ERROR: Error installing bcrypt:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ruby/util.h... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
compiling crypt.c
compiling crypt_blowfish.c
compiling crypt_gensalt.c
compiling wrapper.c
linking shared-object bcrypt_ext.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [bcrypt_ext.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/bcrypt-3.1.7 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/bcrypt-3.1.7/gem_make.out
After this, I try to run sudo gem install bcrypt, still not working. Any tips?
I had upgraded Xcode from the Mac App Store, and that caused this particular error for me.
The way to fix it in my case: run Xcode and accept the license terms, etc. Then when I ran bundle install, it compiled and installed bcrypt just fine.

Error while compiling Ruby (RVM)

OS : Ubuntu 12.04
Ruby : 1.9.3
I'd want to install Ruby with RVM but when I type:
$> rvm install ruby
I have an error while compiling:
/usr/bin/ld: /usr/lib/libX11.a(CrGlCur.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/lib/libX11.a: could not read symbols: Bad value
collect2: ld a retourné 1 code d'état d'exécution
make[2]: *** [../../.ext/x86_64-linux/tcltklib.so] Erreur 1
make[2]: quittant le répertoire « /home/lingla_j/.rvm/src/ruby-1.9.3-p194/ext/tk »
make[1]: *** [ext/tk/all] Erreur 2
make[1]: quittant le répertoire « /home/lingla_j/.rvm/src/ruby-1.9.3-p194 »
make: *** [build-ext] Erreur 2
Thanks for helping!
It looks like you are compiling ruby against static version of libraries, this could happen in rather few rare cases.
Make sure you read rvm requirements and install all required libraries.
Check your RVM configuration files for compilation switches:
cat /etc/rvmrc ~/.rvmrc
And finally reinstall ruby to make sure clean installation is done:
rvm reinstall 1.9.3
As a note right now it's equivalent to rvm install ruby as 1.9.3 is the latest version of ruby.
you can install rvm by bash
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

Resources