Ubuntu18.04部署Fabric2.3踩坑合集
1、Ubuntu18.04换源解决下载出错问题
备份原始源文件 sources.list:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
更改文件权限使其可编辑:
sudo chmod 777 /etc/apt/sources.list
打开文件进行编辑:
sudo gedit /etc/apt/sources.list
删去原来文件内容,复制以下任意一个到文件并保存:
阿里源:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
清华源:
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
163源:
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
更新软件列表,换源完成:
sudo apt update
2、“curl: (7) Failed to connect to raw.githubuserconnect.com port 443: 拒绝连接”、“curl: (35)OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to bit.ly:443”
打开网站https://www.ipaddress.com/
搜索githubuserconnect.com或者bit.ly
搜索结果:
打开/etc目录下的hosts文件
把67.199.248.10 bit.ly放在文件最后保存
3、执行“./network.sh deployCC”时报错“No chaincode name was provided”
更换指令为:
./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go
参考文章——Hyperledger Fabric学习笔记(三)- 启动网络并测试一个Fabcar的demo
4、“sudo:go:找不到命令”
再执行一遍以下命令:
source /etc/profile
5、“failed to normalize chaincode path: ‘go list‘ failed with: ···connection refused:exit status 1”
依次执行:
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct