When installing Bitcoin in Ubuntu, a make compilation error occurs or there is no such file when running ./configure –with-incompatible-bdb.

If you install Bitcoin by installing dependencies and get a make compilation error or run ./configure –with-incompatible-bdb and it shows that there is no such file, you can try my method.

Reference: http://t.csdnimg.cn/bMdRc

If you install this document, you will not be able to verify the path of the Bitcoin file, so you need to enter the shell user and install Bitcoin.

1. Install Bitcoin by installing dependencies

For example:

2. We need to uninstall the dependencies we installed first. If it doesn’t work after uninstalling, you can reinstall it. I just reinstalled it directly.

3. Environment preparation: Install the dependent libraries required to compile bitcoind through the following command:

sudo apt-get install build-essential libtool autotools-dev autoconf automake libssl-dev libboost-all-dev libdb-dev libdb + + -dev pkg-config

1. When “Do you want to continue execution? [Y/n]” appears, just y

4. Update the installation package

sudo apt-get update

5. Enter libevent official website: http://libevent.org/

1. First click on the Ubuntu browser and click on the circled browser. If there are other browsers, you can also

2. Enter the libevent official website address into the search box of the browser, click the first one

3. Enter this page

4. Scroll down to see the installation package, just click on the circled one (this is the latest installation package) 5. After the download is completed, click on the file, find the download, and copy the installation package Ctrl + v to the main file.

6. Right-click the downloaded installation package and copy to the address of the installation package.

6. Open the terminal

cd Add the address you copied, and delete the installation package name after the address you copied.

tar -zxvf plus the name of the installation package

7. cd plus the name of the installation package, delete the tar.gz suffix, and run This command sudo ./configure -prefix=/usr, as shown in the figure

 cd libevent-2.1.12-stable 

sudo ./configure -prefix=/usr

If the operation is successful, the following figure will appear:

7. Then use the ls command to check whether there is a Bitcoin file, as shown in the figure

8. Use sudo -s to enter the privileged user shell to open the bitcoin file, and then cd bitcoin

sudo -s
cd bitcoin

as the picture shows:

9. Run the following command

make

If the operation is successful, the following will appear:

1. If there is no python file, you need to install it (this should be done by make later) will appear and can be installed in advance)

apt install python3

2. After the installation is successful, run make again. If no error occurs, the error message is as shown in the figure:

3. Run make install again and it will be successful without the above error being displayed.

make install

10. Test whether libevent is installed successfully:

ls -al /usr/lib | grep libevent (or ls -al /usr/local/lib | grep libevent)

Run successfully:

11. Go to github to download the latest version of bitcoin

git clone https://github.com/bitcoin/bitcoin.git --recursive

1. Will appear:

2. We need to install the git command

sudo apt install git

3. If “Do you want to continue execution? [Y/n]” appears, just y, and then run this command git clone https://github.com/bitcoin/bitcoin.git –recursive

12. Library configuration required to compile source code:

./autogen.sh

Run successfully:

13. Generate the makefile:

./configure --without-gui --with-incompatible-bdb

Run successfully:

14. When using make to compile, it takes about an hour (I need it when installing, I don’t know if you want it):

make

Run successfully:

15. Install the compiled binaries

make install

When running successfully:

16. Check whether bitcoin is installed successfully:

which bitcoind

When running successfully:

which bitcoin-cli

When running successfully:

Check the bitcoin client again:

bitcoind -h

When running successfully:

Success comes here!

This account is just for me to record the mistakes I encounter in my daily study.

The knowledge points of the article match the official knowledge files, and you can further learn relevant knowledge. Cloud native entry-level skills treeHomepageOverview 17065 people are learning the system