比特币Bitcoin源代码安装编译

比特币Bitcoin源代码安装编译

 

作者:Petter Liu 

来源 https://www.cnblogs.com/wintersun/p/3813424.html

 

 

比特币 (货币符号: ฿;英文名:Bitcoin;英文缩写: BTC),是一种用于开源的P2P软件而产生的电子货币。比特币全局图是这样的:

 

在这儿主要介绍Linux下的比特币Bitcoin安装,我们选择ubuntu 12.04的环境,安装相对容易得多。Windows下并不推荐,因为基于mingW配置相以繁琐。

同时也可以参考build官方文档

https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md

https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md

  
先拉下源代码:

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

安装Berkeley DB 4.8以上版本:

sudo apt-get install libdb5.1++-dev

然后进入到相关目录:

cd bitcoin

./autogen.sh

./configure

如果你遇到这样的提示:configure: error: Found Berkeley DB other than 4.8, required for portable wallets 那就可以这样:

./configure --with-incompatible-bdb

如查遇到到这样的提示:checking for boostlib >= 1.20.0… configure: We could not detect the boost libraries (version 1.20 or higher). 那这样:

sudo apt-get install libboost-all-dev

然后再次configure,如果你需要bitcoin-qt前端,那需要安装

sudo apt-get install libqt4-core libqt4-gui libqt4-dev

再次configure,这次可以了

make

开始编译,大约5分钟,然后安装编译好的二进制文件

make install

想运行前端那执行

bitcoin-qt

服务端是

bitcoind  -server –printtoconcole

 

接到下,是否挖矿就看您自己了。以当前时间为起点,连接testnet有9G的blockchain数据需要下载,livesite有35G的数据需要下载。 
也可以从这里下载文件,以加快速度。后续会介绍关于比特币的更多内容。有兴趣可以阅读它的源代码。

 

资料LINK:

BitCoin比特币 wiki

https://en.bitcoin.it/wiki/Main_Page

Bitcoin比特币 源代码文档

https://dev.visucore.com/bitcoin/doxygen/files.html

Bitcoin比特币 中国

http://www.btcchina.org

 

================ End

 

posted @   lsgxeva  阅读(4656)  评论(0编辑  收藏  举报
编辑推荐:
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
点击右上角即可分享
微信分享提示