-
如何从github上下载单个文件?
打开github上文件地址,点击Raw获取真实文件地址,然后通过curl命令下载curl -O https://raw.githubusercontent.com/Randyshu2018/fabric-multi-machine-deploy/master/installFabricEnv_ubuntu.sh```
-
普通用户切换到root用户无法启动环境变量
原因:非root 和 root 下,环境变量的配置文件不同。
非root下,配置文件为:~/.bashrc ,配置后执行更新: source ~/.bashrc
root下,配置文件为:/etc/profile ,配置后执行更新: source /etc/profile
解决:打开 ~/.bashrc ,把里面相应的配置变量(环境路径),复制到 /etc/profile ,然后更新即可。
-
curl get 请求需要传json格式的参数怎么办?
解决:将{"XX":"xx"}转义为\{"XX":"xx"\} -
hyperledger fabric chaincode 改了之后重新安装还是使用历史版本的镜像
解决:docker images => 历史chaincode镜像没有删掉,删掉即可 -
Syntax error: "(" unexpected
主要是因为Linux系统shell版本不兼容引起的。 shell的版本有sh,ksh,csh, bash,dash……等等。用命令ls -al /bin/sh可以得到我们当前所用的Linux系统的shell属于何版本。
解决:
通过将当前通过以下方式可以使 shell 切换回 bash:sudo dpkg-reconfigure dash
然后选择 no 或者“否 ”,并确认。这样做将重新配置 dash,并使其不作为默认的 shell 工具。
-
/bin/sh: envsubst: command not found
brew install gettext brew link --force gettext
网友评论