zl程序教程

您现在的位置是:首页 >  其他

当前栏目

macos lotus 安装

安装macos lotus
2023-09-14 09:16:04 时间

1,依赖安装

  • 安装依赖go gcc git bzr jq pkg-config
$ which go
/usr/local/bin/go
$ go version
go version go1.13 darwin/amd64

$ which gcc
/usr/bin/gcc

$ which git
/usr/local/bin/git
$ git version
git version 2.23.0

$ brew search bazaar
==> Formulae
bazaar
$ brew install bazaar
$ bzr --version
Bazaar (bzr) 2.7.0

$ brew install jq
$ jq --version
jq-1.6

$ brew install pkg-config
$ pkg-config --version
0.29.2
  • 安装
cmake
$ git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader.git
$ cd OpenCL-ICD-Loader/
$ mkdir build
$ cd build/

2,编译

  • 需要挂终端代理
$ git clone https://github.com/filecoin-project/lotus.git
$ cd lotus/
$ make
$ sudo make install
Password:
install -C ./lotus /usr/local/bin/lotus
install -C ./lotus-storage-miner /usr/local/bin/lotus-storage-miner

3,lotus运行

  • 更改目录权限
sudo chown $(whoami):admin /var/log
  • 后台运行守护进程
lotus daemon > /var/log/lotus.log 2>&1 &
$ lotus net peers | wc -l
      34
$ watch lotus sync status
Height: 1977

$ lotus wallet new bls
https://lotus-faucet.kittyhawk.wtf/

在这里插入图片描述

$ lotus wallet balance
500000000
  • mining
$ lotus state pledge-collateral
18596947193119270372

  • error
$ lotus state pledge-collateral
18596947193119270372
$ lotus wallet balance
500000000

4,删除lotus


参考:

  1. filecoin-project/lotus
  2. 安装Lotus在MacOS
  3. KhronosGroup/OpenCL-ICD-Loader
  4. macOS安装CMake