一、启动test_network时报的错误
1. C:\Program Files\Docker\Docker\resources\bin\docker.exe: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/create: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running. 2. See 'C:\Program Files\Docker\Docker\resources\bin\docker.exe run --help'. 3. error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/containers/json?all=1: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
需要先启动Hyper-V
再启动Docker Desktop,这在重启电脑后容易忘记的两个步骤
二、部署链码时遇到golang.org官网国内不能访问的问题
google.golang.org/grpc/credentials: google.golang.org/grpc@v1.23.0: Get "https://proxy.golang.org/google.golang.org/grpc/@v/v1.23.0.zip": dial tcp 172.217.160.81:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
无奈只能试第三个方法,首先要安装glide,但由于glide 本身也有BUG,不适合国内的特殊情况,只能使用作者推荐的库:https://github.com/xkeyideal/glide,先下载
go get github.com/xkeyideal/glide
但使用这个库需要自行编译(make install),安装make install提示
bash: make: command not found
choco : 无法将“choco”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正
确,然后再试一次。
所在位置 行:1 字符: 1
choco install make
CategoryInfo : ObjectNotFound: (choco:String) [], CommandNotFoundException
FullyQualifiedErrorId : CommandNotFoundException
一层套一层的,还是要先安装choco,以管理员身份打开PoserShell,执行以下命令
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::Sec
测试是否安装成功,输入 choco
接着在powershell里安装make并测试是否安装成功
choco install make
make --v
最后把git base关闭再重新启动,进入$GOPATH/src/github.com/xkeyideal/glide 目录,执行
make install
测试是否正常
glide list
不报错说明已经安装成功
接着回到开头说的第三种方法,直接执行还是报错误
[INFO] No mirrors.yaml file exists. Creating new one
[ERROR] Error writing mirrors.yaml file: open C:\Users\Administrator.glide\mirrors.yaml: The system cannot find the path specified.
An Error has occurred
只能继续填坑,按报错信息在C:\Users\Administrator.glide目录下增加mirrors.yaml文件,内容为
注:.glide目录无法直接使用手工创建,只能先在cmd里使用 mkdir .glide 的命令来创建
然后再测试下:glide mirror list
上面的信息说明配置成功
最后执行
成功后输出
[INFO] mirrors.yaml written with changes