美文网首页
bitcoin源码win10 Ubuntu编译笔记(一)

bitcoin源码win10 Ubuntu编译笔记(一)

作者: 混沌骑士_3606 | 来源:发表于2018-03-19 18:02 被阅读0次

本教程从零开始记录bitcoin源码编译步骤

本章解决Ubuntu不能更新问题

GitHub下载的比特币首先需要编译

按照bitcoin-master\doc\build-windows.md编译说明,采用Ubuntu编译方式

使用windows store可以一键式安装Ubuntu

First, install the general dependencies:

    sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git

执行第一步更新比特币编译所需依赖项时

报错http://archive.ubuntu.com/ubuntu xenial-updates/main amd64

无法继续更新,这是因为Ubuntu默认软件源非中国服务器

为了提高下载速度,将源改为国内的 cn.archive.ubuntu.com ,现在 cn.archive.ubuntu.com 指向阿里云的开源镜像站 mirrors.aliyun.com,下载速度很快。

解决步骤

1. 重命名原来的源作为备份:

$ sudo mv /etc/apt/sources.list sources.list_backup  

2. 新建一个sources.list文件

$ sudo vim /etc/apt/sources.list  

3 输入如下内容并保存退出:

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted  

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted  

deb http://cn.archive.ubuntu.com/ubuntu/ xenial universe  

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universe  

deb http://cn.archive.ubuntu.com/ubuntu/ xenial multiverse  

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiverse  

deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse  

deb http://security.ubuntu.com/ubuntu xenial-security main restricted  

deb http://security.ubuntu.com/ubuntu xenial-security universe  

deb http://security.ubuntu.com/ubuntu xenial-security multiverse  

4 更新apt软件源,测试效果

$ sudo apt-get update  

5  再次执行

  sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl git

可以正确更新

参考内容

http://blog.csdn.net/a787202867/article/details/53084602

相关文章

网友评论

      本文标题:bitcoin源码win10 Ubuntu编译笔记(一)

      本文链接:https://www.haomeiwen.com/subject/fcipqftx.html