zold-io / zold

An Experimental Non-Blockchain Cryptocurrency for Fast Micro Payments
https://www.zold.io
MIT License
195 stars 53 forks source link

extconf.rb:97:in `<main>': OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed. (RuntimeError) #780

Closed dgroup closed 4 years ago

dgroup commented 4 years ago

Describe the bug

extconf.rb:97:in `<main>': OpenSSL library could not be found. 
You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed. (RuntimeError)

The installation steps seem needs to be changed for OSX.

To Reproduce https://github.com/zold-io/zold/blob/master/INSTALL.md#osx

$ brew install rbenv ruby-build
$ rbenv install 2.5.1
$ rbenv global 2.5.1
$ ruby -v
$ gem install --no-ri --no-rdoc zold

Output

13:24:44 .ssh $ sudo gem install --no-ri --no-rdoc zold
Building native extensions.  This could take a while...
ERROR:  Error installing zold:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/openssl-2.1.2/ext/openssl
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20191222-67512-1q3g5nf.rb extconf.rb
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for openssl/ssl.h... no
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/$(RUBY_BASE_NAME)
    --with-openssl-dir
    --with-openssl-include
    --without-openssl-include=${openssl-dir}/include
    --with-openssl-lib
    --without-openssl-lib=${openssl-dir}/lib
    --with-kerberos-dir
    --without-kerberos-dir
    --with-kerberos-include
    --without-kerberos-include=${kerberos-dir}/include
    --with-kerberos-lib
    --without-kerberos-lib=${kerberos-dir}/lib
    --with-debug
    --without-debug
    --enable-debug
    --disable-debug
    --with-nsllib
    --without-nsllib
    --with-socketlib
    --without-socketlib
    --with-openssl-config
    --without-openssl-config
    --with-pkg-config
    --without-pkg-config
extconf.rb:97:in `<main>': OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed. (RuntimeError)

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/openssl-2.1.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/openssl-2.1.2 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/openssl-2.1.2/gem_make.out

Expected behavior Zold is installed.

Desktop (please complete the following information):

0crat commented 4 years ago

@yegor256/z please, pay attention to this issue

0crat commented 4 years ago

@dgroup/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

yegor256 commented 4 years ago

@dgroup try this:

$ brew install openssl
dgroup commented 4 years ago

@yegor256

05:55:07 projects $ brew install openssl
==> Installing dependencies for git: gettext and pcre2
==> Installing git dependency: gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.20.1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/10/107d7f386fbeea6979f9376cdbbcf3f60943caaad61bdc754d3019ce625dffe6?__gda__=exp=1577147839~hmac=91aa7bc5f09b2ad7df049d7c850e231e50a344e74b79694b14c910677909df98&response-content-disposition=attachment%3Bfilename%3D%22gettext-0.20.
Updating Homebrew...
######################################################################## 100.0%
==> Pouring gettext-0.20.1.catalina.bottle.tar.gz
==> Caveats
gettext is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

If you need to have gettext first in your PATH run:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

For compilers to find gettext you may need to set:
  export LDFLAGS="-L/usr/local/opt/gettext/lib"
  export CPPFLAGS="-I/usr/local/opt/gettext/include"

==> Summary
🍺  /usr/local/Cellar/gettext/0.20.1: 1,893 files, 18.4MB
==> Installing git dependency: pcre2
==> Downloading https://homebrew.bintray.com/bottles/pcre2-10.34.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/af/af3bf030a455daf0a560f8d9e433f7a803d7150933895699f311d661c33b9729?__gda__=exp=1577147848~hmac=d1d2a842d4a53f76ce98d79a2afb4ce6433491ec9132e6277bf69464f62f2de8&response-content-disposition=attachment%3Bfilename%3D%22pcre2-10.34.c
######################################################################## 100.0%
==> Pouring pcre2-10.34.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/pcre2/10.34: 230 files, 5.9MB
==> Installing git
==> Downloading https://homebrew.bintray.com/bottles/git-2.24.1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/27/2779f9cea861ef4d906093ac7b7255b3eeb7b6f76cbbc8407035bd3d3b80305d?__gda__=exp=1577147854~hmac=cdcabf9579f9ed8b0744c1c437a51f942b8e7dd3c010024514fc9c925aa027d7&response-content-disposition=attachment%3Bfilename%3D%22git-2.24.1.ca
######################################################################## 100.0%
==> Pouring git-2.24.1.catalina.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/git
==> Summary
🍺  /usr/local/Cellar/git/2.24.1: 1,558 files, 45.5MB
==> Caveats
==> gettext
gettext is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD gettext library & some software gets confused if both are in the library path.

If you need to have gettext first in your PATH run:
  echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> ~/.bash_profile

For compilers to find gettext you may need to set:
  export LDFLAGS="-L/usr/local/opt/gettext/lib"
  export CPPFLAGS="-I/usr/local/opt/gettext/include"

==> git
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions and functions have been installed to:
  /usr/local/share/zsh/site-functions

Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/git
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/cask-versions and homebrew/cask).
No changes to formulae.

Warning: openssl@1.1 1.1.1d is already installed and up-to-date
To reinstall 1.1.1d, run `brew reinstall openssl@1.1`

Done, now the command gem install --no-ri --no-rdoc zold gives

05:55:55 projects $ gem install --no-ri --no-rdoc zold
ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --no-ri
dgroup commented 4 years ago

Seems this https://github.com/mongodb/mongo-php-driver/issues/523 may help

$ cd /usr/local/include 
$ ln -s ../opt/openssl/include/openssl .
0crat commented 4 years ago

This job is not in scope

0crat commented 4 years ago

Job gh:zold-io/zold#780 is not assigned, can't get performer