LoginSignup
0
0

More than 3 years have passed since last update.

Ubuntu18.04にElements環境を構築する

Last updated at Posted at 2019-06-18

はじめに

Hello Qiiters!
しがない大学生の卒研用備忘録.

環境構築

Ubuntu 18.04(初期化済み)

STEP1: Bitcoin Coreのインストール

以下Ubuntuのターミナルで実行

sudo apt-add-repository ppa:bitcoin/bitcoin
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install bitcoind

正常にインストールされているかチェック

which bitcoind
>/usr/bin/bitcoind

上記ならOK.
尚, 他環境ではどうなるかわからない.

STEP2:Elementsのインストール

STEP2-1:Gitのインストール

sudo apt install git

STEP2-2:Gitからリポジトリをクローン
注意: ご自身のホームディレクトリに移動してからクローンしてください[初期:/home/username]

git clone https://github.com/ElementsProject/elements.git

STEP2-3:必要なパッケージをインストール

sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler imagemagick librsvg2-bin
sudo apt-get install libqrencode-dev autoconf openssl libssl-dev libevent-dev
sudo apt-get install libminiupnpc-dev
sudo apt-get install libdb4.8-dev libdb4.8++-dev
sudo apt install jq

インストールが終わったら, ホームディレクトリにある(であろう) elementsに移動

cd elements

STEP2-4:Elementsのインストール
上記コマンドでディレクトリの移動ができたら, 以下のコマンドを叩く.

./autogen.sh
./configure
make

最後にmake installっと...
ん?エラーが出たぞ.

エラー文
$ make install
Making install in src
make[1]: ディレクトリ '/home/yu/elements/src' に入ります
make[2]: ディレクトリ '/home/yu/elements/src' に入ります
make[3]: ディレクトリ '/home/yu/elements' に入ります
make[3]: ディレクトリ '/home/yu/elements' から出ます
make[3]: ディレクトリ '/home/yu/elements/src' に入ります
make[4]: ディレクトリ '/home/yu/elements' に入ります
make[4]: ディレクトリ '/home/yu/elements' から出ます
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool --preserve-dup-deps  --mode=install /usr/bin/install -c   libelementsconsensus.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libelementsconsensus.so.0.0.0 /usr/local/lib/libelementsconsensus.so.0.0.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libelementsconsensus.so.0.0.0': Permission denied
Makefile:4979: recipe for target 'install-libLTLIBRARIES' failed
make[3]: *** [install-libLTLIBRARIES] Error 1
make[3]: ディレクトリ '/home/yu/elements/src' から出ます
Makefile:13324: recipe for target 'install-am' failed
make[2]: *** [install-am] Error 2
make[2]: ディレクトリ '/home/yu/elements/src' から出ます
Makefile:12996: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: ディレクトリ '/home/yu/elements/src' から出ます
Makefile:783: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

よくよく読んでみるとPermission deniedとのこと. 要するに権限がない, と.
というわけで以下を実行

$ sudo make install
~~
$ which elementsd
>/usr/local/bin/elementsd

大丈夫そうですね.

これでElementsのインストールが完了しました.
お疲れ様でした.

次回はElementsの動作設定です.

引用

Elements by BlockStream

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0