I'm trying to install ruby 2.2.10 with ASDF without success. I tried to find on my own why it's this happening now. Not sure if some brew update it breaks it or what.
Here I share the output of the install:
asdf install
elixir 1.10.2-otp-22 is already installed
elm 0.18.0 is already installed
istioctl 1.4.7 is already installed
Downloading openssl-1.0.2u.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/ecd0c6ffb493dd06707d38b14bb4d8c2288bb7033735606569d8f90f89669d16
Installing openssl-1.0.2u...
Installed openssl-1.0.2u to /Users/murbano/.asdf/installs/ruby/2.2.10
Downloading ruby-2.2.10.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.10.tar.bz2
Installing ruby-2.2.10...
WARNING: ruby-2.2.10 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
BUILD FAILED (OS X 10.15.6 using ruby-build 20200520)
Inspect or clean up the working tree at /var/folders/47/wxs46t2s6db9fh1zv640mpdr0000gn/T/ruby-build.20200921205118.64211.ty44rI
Results logged to /var/folders/47/wxs46t2s6db9fh1zv640mpdr0000gn/T/ruby-build.20200921205118.64211.log
Last 10 log lines:
compiling complex.c
compiling dir.c
compiling dln_find.c
compiling encoding.c
encoding.c:825:2: error: implicit declaration of function 'rb_str_change_terminator_length' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
rb_str_change_terminator_length(obj, oldtermlen, termlen);
^
1 error generated.
make: *** [encoding.o] Error 1
make: *** Waiting for unfinished jobs....
Also tried with:
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" asdf install
elixir 1.10.2-otp-22 is already installed
elm 0.18.0 is already installed
istioctl 1.4.7 is already installed
Downloading ruby-2.2.10.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.10.tar.bz2
Installing ruby-2.2.10...
WARNING: ruby-2.2.10 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
BUILD FAILED (OS X 10.15.6 using ruby-build 20200520)
Inspect or clean up the working tree at /var/folders/47/wxs46t2s6db9fh1zv640mpdr0000gn/T/ruby-build.20200921210737.34707.yrr2le
Results logged to /var/folders/47/wxs46t2s6db9fh1zv640mpdr0000gn/T/ruby-build.20200921210737.34707.log
Last 10 log lines:
compiling dln_find.c
compiling encoding.c
compiling enum.c
encoding.c:825:2: error: implicit declaration of function 'rb_str_change_terminator_length' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
rb_str_change_terminator_length(obj, oldtermlen, termlen);
^
compiling enumerator.c
1 error generated.
make: *** [encoding.o] Error 1
make: *** Waiting for unfinished jobs....
brew --prefix openssl
/usr/local/opt/openssl#1.1
I installed XCode, restarted, something it's stoping the install but I'm not sure why.
That happened after uninstalled ruby to do a new clean install.
Related
I am having issues installing Ruby with rbenv and it appears to be an openssl issue. I have followed the below links with no success
Links:
OpenSSL error installing Ruby 2.1.x and 2.3.x on Archlinux with ruby-install/ruby-build
https://github.com/rbenv/ruby-build/wiki#openssl-sslv3_method-undeclared-error
Ubuntu 20.04
OpenSSL 1.0.2
ruby-build 20211019
scoop#scoop-VirtualBox:~$ rbenv install 1.9.3-p327
Downloading yaml-0.1.6.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749
Installing yaml-0.1.6...
Installed yaml-0.1.6 to /home/scoop/.rbenv/versions/1.9.3-p327
Downloading ruby-1.9.3-p327.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.bz2
Installing ruby-1.9.3-p327...
WARNING: ruby-1.9.3-p327 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
BUILD FAILED (Ubuntu 20.04 using ruby-build 20211019)
Inspect or clean up the working tree at /tmp/ruby-build.20211022151319.51817.ZFwydR
Results logged to /tmp/ruby-build.20211022151319.51817.log
Last 10 log lines:
| ^~~~~~~~~~~~
ossl_ocsp.c: In function ‘ossl_ocspcid_get_serial’:
ossl_ocsp.c:694:1: warning: control reaches end of non-void function [-Wreturn-type]
694 | }
| ^
make[2]: *** [Makefile:267: ossl_ocsp.o] Error 1
make[2]: Leaving directory '/tmp/ruby-build.20211022151319.51817.ZFwydR/ruby-1.9.3-p327/ext/openssl'
make[1]: *** [exts.mk:126: ext/openssl/all] Error 2
make[1]: Leaving directory '/tmp/ruby-build.20211022151319.51817.ZFwydR/ruby-1.9.3-p327'
make: *** [uncommon.mk:178: build-ext] Error 2
I found Ubuntu > 18.04 does not have the correct dependencies to support OpenSSL 1.0 so I switched to 18.04 and did the following:
# cd into source directory you downloaded and unarchived
./config --prefix=/opt/openssl-1.0 shared
make
make test
sudo make install
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/openssl-1.0" rbenv install <version>
this comes from the below link:
https://github.com/rbenv/ruby-build/wiki#openssl-sslv3_method-undeclared-error
I am trying to install ruby 2.2.3, previously I have installed ruby 2.2.2,
rbenv versions
system
* 2.2.2 (set by /home/emen/.ruby-version)
jruby-1.7.20
jruby-9.0.0.0.pre2Build
I got a problem when tried to install Ruby 2.2.3, got build failed below :
rbenv install 2.2.3
Downloading ruby-2.2.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.bz2 Installing ruby-2.2.3...
BUILD FAILED (Ubuntu 14.04 using ruby-build 20160111-27-g06f1254)
Inspect or clean up the working tree at /tmp/ruby-build.20160127112741.26444 Results logged to /tmp/ruby-build.20160127112741.26444.log
I have inspected log, just copy a part of suspect since another checking and compiling process were fine :
linking shared-object objspace.so
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/objspace'
compiling ossl_ssl.c
make[2]: Entering directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/pathname'
compiling pathname.c
ossl_ssl.c:141:27: error: ‘SSLv3_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:142:27: error: ‘SSLv3_server_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_server),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
ossl_ssl.c:143:27: error: ‘SSLv3_client_method’ undeclared here (not in a function)
OSSL_SSL_METHOD_ENTRY(SSLv3_client),
^
ossl_ssl.c:119:69: note: in definition of macro ‘OSSL_SSL_METHOD_ENTRY’
#define OSSL_SSL_METHOD_ENTRY(name) { #name, (SSL_METHOD *(*)(void))name##_method }
^
make[2]: *** [ossl_ssl.o] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/openssl'
make[1]: *** [ext/openssl/all] Error 2
make[1]: *** Waiting for unfinished jobs....
installing default pathname libraries
linking shared-object date_core.so
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/date'
linking shared-object pathname.so
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/pathname'
linking shared-object nkf.so
make[2]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3/ext/nkf'
make[1]: Leaving directory `/tmp/ruby-build.20160127112741.26444/ruby-2.2.3'
make: *** [build-ext] Error 2
I have tried to follow this
rbenv install ruby BUILD FAILED
I have run this :
sudo apt-get install libffi-dev
or
sudo apt-get install git-core curl
zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev
python-software-properties libffi-dev
and
curl -fsSL https://gist.github.com/ekr1/7313abef4348daa038dd.txt |
rbenv install --patch 2.2.3
but still no luck, I might miss something, appreciating your help. Thanks!
I have fixed this build failed by patching from https://gist.github.com/mislav/055441129184a1512bb5/
executed this :
curl -fsSL https://gist.github.com/mislav/055441129184a1512bb5.txt |
rbenv install --patch 2.2.3
this looks like an openssl problem. The SSL_v3 not defined means that you don't have it or you have an older library.
Try:
rvm pkg install openssl
rvm install 2.2.3 --with-openssl-dir=$HOME/.rvm/usr
I have problems compiling Ruby on a DigitalOcean Droplet.
rbenv 0.4.0-97-gfe0b243
Ubuntu 14.04 LTS
Linux bashman 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
rbenv install 2.1.1
gives me: https://gist.github.com/astropanic/e4d3a3602612b3c21636
The failure seems to be related to:
compiling readline.c
readline.c: In function ‘Init_readline’:
readline.c:1977:26: error: ‘Function’ undeclared (first use in this function)
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c:1977:26: note: each undeclared identifier is reported only once for each function it appears in
readline.c:1977:36: error: expected expression before ‘)’ token
rl_pre_input_hook = (Function *)readline_pre_input_hook;
^
readline.c: At top level:
readline.c:634:1: warning: ‘readline_pre_input_hook’ defined but not used [-Wunused-function]
readline_pre_input_hook(void)
^
make[2]: *** [readline.o] Error 1
make[2]: Leaving directory `/tmp/ruby-build.20140502004823.5335/ruby-2.1.1/ext/readline'
make[1]: *** [ext/readline/all] Error 2
make[1]: Leaving directory `/tmp/ruby-build.20140502004823.5335/ruby-2.1.1'
make: *** [
build-ext] Error 2
Any ideas ?
The failure to build ruby 2.1 because of readline appears to be a known error.
I was successful building it using one of the suggested patches like this:
curl -fsSL https://gist.github.com/mislav/a18b9d7f0dc5b9efc162.txt | rbenv install --patch 2.1.1
Downgrading the readline library to version 6.2.4 is an alternative suggestion but I haven't tried that.
Following will solve your problem:
sudo apt install libssl1.0-dev
I'm installing gnupg2 using homebrew on mac osx and getting errors intstalling the dependency libusb.
brew install gpg2
....
==> Installing gnupg2 dependency: libusb
==> Downloading http://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2
Already downloaded: /Library/Caches/Homebrew/libusb-1.0.9.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/libusb/1.0.9
==> make install
os/darwin_usb.c:1749: error: old-style parameter declarations in prototyped function definition
os/darwin_usb.c:1749: error: expected '{' at end of input
make[1]: *** [libusb_1_0_la-darwin_usb.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [install-recursive] Error 1
Any ideas how to fix this?
Thanks
Had the same problem, fixed it by installing the XCode command line tools (previously was using gcc standalone package)
I'm trying to have my Rails website running on my fresh installation of Mountain Lion Server. Not using RVM, because I don't need many rails or ruby installations. Configuring ruby and rails to run smoothly is a pain in the ass.
Compiled the newest version of OpenSSL with these commands:
sudo ./configure --prefix=/usr/local/ darwin64-x86_64-cc
sudo make
sudo make install
Now when I type I get this:
grid:ruby-1.9.3-p392 Clu$ openssl version
OpenSSL 1.0.1e 11 Feb 2013
When I try to configure Ruby from source, I get to Segmentation Fault:
compiling md5init.c
compiling md5ossl.c
linking shared-object digest/md5.bundle
installing default md5 libraries
compiling rmd160init.c
compiling rmd160ossl.c
linking shared-object digest/rmd160.bundle
installing default rmd160 libraries
compiling sha1init.c
compiling sha1ossl.c
linking shared-object digest/sha1.bundle
collect2: ld terminated with signal 11 [Segmentation fault: 11]
make[2]: *** [../../../.ext/x86_64-darwin12.2.1/digest/sha1.bundle] Error 1
make[1]: *** [ext/digest/sha1/all] Error 2
make: *** [build-ext] Error 2