You can do
sudo apt-get install -y software-properties-common
sudo add-apt-repository -u ppa:bitcoin/bitcoin
sudo add-apt-repository -u ppa:lightningnetwork/ppa
sudo apt-get install bitcoind lightningd
If you don't want to add external repositories you can flollow the clightning docs from https://github.com/ElementsProject/lightning/blob/master/doc/INSTALL.md they worked perfectly last time I checked and are copied here for your convenience.
Library Requirements
You will need several development libraries:
- libsqlite3: for database support.
- libgmp: for secp256k1
- zlib: for compression routines.
For actually doing development and running the tests, you will also need:
- pip3: to install python-bitcoinlib
- valgrind: for extra debugging checks
You will also need a version of bitcoind with segregated witness and estimatesmartfee
economical node, such as the 0.16 or above.
To Build on Ubuntu
OS version: Ubuntu 15.10 or above
Get dependencies:
sudo apt-get update
sudo apt-get install -y \
autoconf automake build-essential git libtool libgmp-dev \
libsqlite3-dev python python3 python3-mako net-tools zlib1g-dev libsodium-dev \
git gettext
Clone lightning:
git clone https://github.com/ElementsProject/lightning.git
cd lightning
For development or running tests, get additional dependencies:
sudo apt-get install -y valgrind python3-pip libpq-dev
sudo pip3 install -r tests/requirements.txt -r doc/requirements.txt
Build lightning:
./configure
make
sudo make install
Running lightning:
bitcoind --datadir=<path_to_blockchain> && ./lightningd/lightningd && ./cli/lightning-cli help
Note: You may need to include testnet=1
in bitcoin.conf