【区块链编程03】如何解决FIleCoin源码编译失败显示jq:command not found

Filecoin编译可在github中找到方法

https://github.com/filecoin-project/go-filecoin

其中需要安装的除了Rust和Go 还有jq,否则会报错:

RUST_PROOFS=true go run ./build deps
pkg-config --version
0.29.1
Installing dependencies...
go mod download
Getting parameters...
./scripts/install-filecoin-ffi.sh
+ auth_header=()
+ '[' -n '' ']'
++ dirname ./install-filcrypto
+ cd .
+ rust_sources_dir=rust
++ jq -r '.[].rustc_target_feature'
./install-filcrypto: line 23: jq: command not found
+ optimized_release_rustc_target_features=
Command './scripts/install-filecoin-ffi.sh' failed: exit status 127
exit status 1

https://blog.csdn.net/u012429005/article/details/79528824

然后经历大概一个小时

这样

ases/download/59e1ffb992c11272/filecoin-ffi-Linux-standard.tar.gz"
    }
  ],
  "tarball_url": "https://api.github.com/repos/filecoin-project/filecoin-ffi/tarball/59e1ffb992c11272",
  "zipball_url": "https://api.github.com/repos/filecoin-project/filecoin-ffi/zipball/59e1ffb992c11272",
  "body": ""
}'
+ local __release_url=https://api.github.com/repos/filecoin-project/filecoin-ffi/releases/assets/19028589
++ basename https://api.github.com/repos/filecoin-project/filecoin-ffi/releases/assets/19028589
+ local __tar_path=/tmp/filecoin-ffi-Linux-optimized_19028589.tar.gz
+ [[ -z https://api.github.com/repos/filecoin-project/filecoin-ffi/releases/assets/19028589 ]]
++ curl --head --retry 3 --header Accept:application/octet-stream --location --output /dev/null -w '%{url_effective}' https://api.github.com/repos/filecoin-project/filecoin-ffi/releases/assets/19028589
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0

老半天之后又输出这个

info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustc-dev'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustc-dev'
info: installing component 'rustfmt'
....

老半天后又输出这个

   Compiling libc v0.2.67
   Compiling autocfg v1.0.0
   Compiling cfg-if v0.1.10
   Compiling spin v0.5.2
   Compiling semver-parser v0.7.0
   Compiling proc-macro2 v1.0.9
   Compiling cc v1.0.50
   Compiling unicode-xid v0.2.0
   Compiling syn v1.0.16
   Compiling byteorder v1.3.4
   Compiling maybe-uninit v2.0.0
   Compiling log v0.4.8
   Compiling futures v0.1.29
   Compiling typenum v1.11.2
   Compiling scopeguard v1.1.0
   Compiling bitflags v1.2.1
   Compiling either v1.5.3
   Compiling serde v1.0.104
...

老半天后又输出这个

thread -lutil -lutil;' filcrypto.pc.template
+ find -L . -type f -name filcrypto.h
+ read
+ find -L . -type f -name libfilcrypto.a
+ read
+ exit
+ rm -f /tmp/tmp.qsUn9MGR4p
+ popd
~/Desktop/project/go-filecoin/vendors/filecoin-ffi
+ find -L rust/target/release -type f -name filcrypto.h -exec cp -- '{}' . ';'
+ find -L rust/target/release -type f -name libfilcrypto.a -exec cp -- '{}' . ';'
+ find -L rust -type f -name filcrypto.pc -exec cp -- '{}' . ';'
+ check_installed_files
+ [[ ! -f ./filcrypto.h ]]
+ [[ ! -f ./libfilcrypto.a ]]
+ [[ ! -f ./filcrypto.pc ]]
+ echo '[install-filcrypto/main] successfully built and installed libfilcrypto from source'
[install-filcrypto/main] successfully built and installed libfilcrypto from source
+ exit

老半天后又...

看到exit以为又凉了。

看到successfully,感觉终于..

明天更新挖矿过程

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值