lian / bitcoin-ruby

bitcoin utils and protocol in ruby.
Other
922 stars 322 forks source link

undefined method `regenerate_key` for Bitcoin::OpenSSL_EC:Module #286

Closed longhoangwkm closed 5 years ago

longhoangwkm commented 5 years ago

A part of my code:

#...
  key = Bitcoin::Key.from_base58(private_key)
  sig = key.sign(new_tx.signature_hash_for_input(indx, prev_tx))
  new_tx.in[indx].script_sig = Bitcoin::Script.to_signature_pubkey_script(sig, [key.pub].pack('H*')) # error here

undefined method regenerate_key' for Bitcoin::OpenSSL_EC:Module

Looking for a help. Many thanks

longhoangwkm commented 5 years ago

It's worked as well with 2.3.3 but i need to upgrade to 2.5

longhoangwkm commented 5 years ago

i got a new error when trying to debug FFI::NotFoundError: Function 'SSL_library_init' not found in [libssl.so]

longhoangwkm commented 5 years ago

Run ln -nfs /usr/lib/x86_64-linux-gnu/libssl.so.1.0.2 /usr/lib/x86_64-linux-gnu/libssl.so worked for me