Author

Topic: c-lightning on ubuntu (Read 185 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
November 07, 2020, 06:13:55 AM
#8
For future reference, you can run Bitcoin Core directly with these command

Code:
snap run bitcoin-core.cli
snap run bitcoin-core.daemon
snap run bitcoin-core.qt

/usr/bin or /usr/local/bin are typical directories (folders) for installing programs, but it seems snap puts programs installed using it in a different place

Some documentation mention it's on /snap/bin. It store all application installed by Snap, but if you run ls -l, you will find out,
1. The application actually only act as symbolic links.
2. Snap change default binary name of an application (e.g. bitcoin-cli become bitcoin-core.cli)

But alternatively you could find the executable by using command lsblk, then see which mountpoint belong to application (e.g. Bitcoin Core at /snap/bitcoin-core/319).

Code:
$ cd /snap/bitcoin-core/319
$ ls
bin  command-cli.wrapper  command-daemon.wrapper  command-qt.wrapper  etc  flavor-select  lib  meta  share  snap  usr  var
$ cd bin
$ ls
bitcoin-cli  bitcoind  bitcoin-qt  desktop-launch

TLDR, snap provide easy installation, but annoying for everything else.
newbie
Activity: 6
Merit: 4
November 06, 2020, 05:54:50 PM
#7
ah, thanks!

nothing as good as proper documentation.  --bitcoin-cli --bitcoin-rpcuser and --bitcoin-rpcpassword; now it's happy!!  So much more to learn; but at least it's running
legendary
Activity: 1946
Merit: 1427
November 06, 2020, 04:59:47 PM
#6
I'm getting closer; making a link is good; but my node rpc listens on my local IPv4 address and not on localhost.  so I think that is why it still is complaining about not finding bitcoin-cli.  Does c-lighting have a config setting for host user and password?
I don't use C-Lightning, but did you check out this documentation here? https://lightning.readthedocs.io/lightningd-config.5.html
newbie
Activity: 6
Merit: 4
November 06, 2020, 04:54:56 PM
#5
I'm getting closer; making a link is good; but my node rpc listens on my local IPv4 address and not on localhost.  so I think that is why it still is complaining about not finding bitcoin-cli.  Does c-lighting have a config setting for host user and password?
legendary
Activity: 3430
Merit: 3079
November 06, 2020, 12:33:59 PM
#4
Does anyone have a tutorial I can follow?

so here is my tutorial Cheesy

1. Open Terminal, do sudo find / -name bitcoin-cli
2. Take the result, and do ln -s /usr/local/bin
3. Don't forget that Snap might change all this later! Then you have the fun of doing it all again
legendary
Activity: 3430
Merit: 3079
November 06, 2020, 12:20:33 PM
#3
^ good advice


You need to find where snap has put bitcoin-cli, as lightningd is looking for it in the wrong place

/usr/bin or /usr/local/bin are typical directories (folders) for installing programs, but it seems snap puts programs installed using it in a different place

...and...

Beware! Don't be surprised in the future if snap "updates" the place where bitcoin-cli etc is installed, then the link in @Rath's post will stop working (the ln -s terminal command)


My advice: learn how to install programs _without_ snap packages, the sooner you do it, the faster you can say goodbye to this kind of problem
legendary
Activity: 1876
Merit: 3132
November 06, 2020, 09:45:21 AM
#2
Does anyone have a tutorial I can follow?

What instructions have you followed so far? You can try following these instructions instead. Bitcoin Core installation using snap is also described there. The following command might help you with your error.

Code: (https://github.com/ElementsProject/lightning/blob/master/doc/INSTALL.md#to-build-on-ubuntu)
# Snap does some weird things with binary names; you'll
# want to add a link to them so everything works as expected
sudo ln -s /snap/bitcoin-core/current/bin/bitcoin{d,-cli} /usr/local/bin/
newbie
Activity: 6
Merit: 4
November 06, 2020, 09:40:06 AM
#1
Hello all,

I have Ubuntu 20, I did snap install bitcoin-core, now I want c-lightning, but can't see to make it work.  I can add the PPA for lightning network, install it; but it can't find bitcoin. 
Quote
bitcoin-cli not found.
  Do I need to reinstall bitcoin in a different way than snap? I would like to preserve my blockchain and bitcoin.conf (yes I have a backup of that)

Does anyone have a tutorial I can follow?
Jump to: