centos7和redhat7的比特币环境搭建

比特币版本是 bitcoin-0.12
问题1:
[root@localhost bitcoin-master]# ./autogen.sh 
which: no autoreconf in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
configuration failed, please install autoconf first
[root@localhost bitcoin-master]# yum install autoconf automake libtool
 
问题2:
checking whether the C++ compiler works... no
configure: error: in `/home/ljw/bitcoin-master':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
[root@localhost bitcoin-master]# yum install gcc-c++
 
问题3:
checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)
[root@localhost ljw]# cd db-4.8.30/build_unix/
[root@localhost build_unix]# ../dist/configure --enable-cxx
[root@localhost build_unix]# make 
[root@localhost build_unix]# make install
[root@localhost db-4.8.30]# cd /home/ljw/bitcoin-master
[root@localhost bitcoin-master]# ./configure LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib/" CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include/"
 
问题4:
configure: error: No working boost sleep implementation found.
[root@localhost ljw]# cd boost_1_63_0 
[root@localhost boost_1_63_0]# ./bootstrap.sh
[root@localhost boost_1_63_0]# ./bjam install
 
问题5:
checking for SSL... no
configure: error: openssl  not found.
[root@localhost bitcoin-master]# yum install openssl-devel
 
问题6:
checking for EVENT... no
configure: error: libevent not found.
[root@localhost bitcoin-master]# yum install libevent-devel
 
//可能有效的库
sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel
 
 
来自redhat的错误,当安装lievent时的错误处理
问题1:
checking for EVENT... no
configure: error: libevent not found.
解决:
tar -zxvf libevent-2.0.19-stable.tar.gz
cd libevent-2.0.19-stable/
./configure
make && make install
此时会生成libevent.pc在本地目录。拷贝到pkgconfig目录下。
[root@c04502 libevent-release-2.1.7-rc] cp ./libevent.pc /usr/share/pkgconfig/.
 
 
问题2:
configure: error: libevent_pthreads not found.
解决:
[root@c04502 libevent-release-2.1.7-rc] cp ./libevent_pthreads.pc /usr/share/pkgconfig/.
 
 
问题3:
对于m4_pattern_allow的问题 (低版本的redhat的可能会出现的问题)
去configure.ac中屏蔽掉对应的语句即可,但是这也会导致后续的库的链接的问题,具体出现在.confiugre中,需要指定添加了boost和openssl的库的路径。
所以不推荐使用低版本的redhat作为运行机器。
原文地址:https://www.cnblogs.com/405845829qq/p/9263635.html