0

After having compiled the Litecoin daemon found at:

https://github.com/litecoin-project/litecoin.git

and set up a username and password, calling

litecoin-cli -rpcuser=<username> -rpcpassword=<password> getnewaddress

returns the error "method not found" from the litecoin daemon litecoind.

migrated from serverfault.com Feb 10 '18 at 21:51

This question came from our site for system and network administrators.

3

The answer is to recompile the Litecoin daemon, making sure to call the configure script with the --enable-wallet option:

./configure --enable-wallet

From there, make and make-install will give you a binary that has the getnewaddress RPC method available.

This reason behind this is that - instead of just disabling the methods around using the daemon as a wallet, or throwing an error in the case they're used without the --enable-wallet compilation option - the methods themselves are not compiled into the binary at all. This is likely due to the use of litecoind as a wallet requiring an extra library - the Berkeley DB library - and the path of least resistance being to not try to compile that section of the code at all in order to avoid issues with referencing the library, but that's conjecture.

This should also solve similar issues in other coins forked from the bitcoin source, and for bitcoin itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.