手把手教你搭建Facebook区块链Libra的开发环境
123458254
发表于 2023-1-8 10:01:17
189
0
0
安装Move项目开发环境8 W# Z0 O* [7 W5 c: i
1.打开https://developers.libra.org/docs/my-first-transaction网站,并使用git命令克隆项目+ r" T/ b) a; q
git clone https://github.com/libra/libra.git, O% b2 H7 G9 a; S" k' |+ `
2.配置yum源
使用以下命令,配置yum源
sudo gedit fedora-163.repo * }; F' Y; l2 R; I* R
sudo gedit fedora-updates-163.repo0 E5 v% X3 M6 I$ c4 \9 M) W( T
其中fedora-163.repo文件的内容如下,直接贴过去即可
?948 ?sudo unzip -o protoc-3.9.0-linux-x86_64.zip -d /usr/local bin/protoc! @! @9 l( f! A1 H8 I k
? 950 ?sudo unzip -o protoc-3.9.0-linux-x86_64.zip -d /usr/local include/*
fedora-updates-163.repo文件的内容如下:* P3 X. R+ x f( ~
[updates]# ^( T' p( V+ \
name=Fedora 17 - $basearch - Updates - 163.com
failovermethod=priority5 ?& c7 V1 |. d* |3 s6 F
baseurl=http://mirrors.163.com/fedora/updates/17/$basearch/
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f17&arch=$basearch
enabled=1
gpgcheck=02 x: d/ J Y! `& F# f
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
[updates-debuginfo] Q" h2 y1 m3 _% D/ G/ J
name=Fedora 17 - $basearch - Updates - Debug - 163.com
failovermethod=priority5 Z- @6 ^3 }/ J+ ~* ?
baseurl=http://mirrors.163.com/fedora/updates/17/$basearch/debug/# n! z% ~( S$ E* ^2 x* v
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f17&arch=$basearch
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch: f+ K I! l2 S, }1 r
$ {7 T% G$ s( D
[updates-source]! P: S$ P/ q$ P G
name=Fedora 17 - Updates Source - 163.com
failovermethod=priority
baseurl=http://mirrors.163.com/fedora/updates/17/SRPMS/* f2 B: \# p$ S6 m2 X. n* ?/ r6 `
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f17&arch=$basearch
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch
使用以下命令,重新配置yum源:- O# H9 h" R6 K, M7 G1 d
yum makecache
yum repolist all
看到有如下返回,就大成告成了。
repo id repo name status1 n. o, ~8 N9 P8 l$ N6 p
fedora Fedora 17 - x86_64 - 163.com enabled: 27,033! q1 Z( C' ]% E) E: r7 s, I
fedora-debuginfo Fedora 17 - x86_64 - Debug - 163.com disabled
fedora-source Fedora 17 - Source - 163.com disabled* ]$ l8 I% g5 G! Q4 ?" c
updates Fedora 17 - x86_64 - Updates - 163.com enabled: 13,163
updates-debuginfo Fedora 17 - x86_64 - Updates - Debug - 163.com disabled
updates-source Fedora 17 - Updates Source - 163.com disabled4 U# d- U5 b4 \" H( n3 i% A3 q0 h U
repolist: 40,196
3.安装protoc* d8 d# `7 S0 A V4 M0 M: ^6 ^
使用以下命令安装protoc. d2 l# y+ E$ c6 ~: U4 c5 N4 }
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.8.0/protoc-3.8.0-linux-x86_64.zip
sudo unzip -o protoc-3.8.0-linux-x86_64.zip -d /usr/local bin/protoc: q% g$ m, h( t, Y9 s2 Y
sudo unzip -o protoc-3.8.0-linux-x86_64.zip -d /usr/local include/*
4.安装Go语言; X+ m' |, D( J) [
使用以下命令安装Go语言5 Z0 N" `- ^7 |: x4 N' h4 v
sudo apt-get install golang
5.安装Libra Core环境
使用以下命令配置LibraCore
cd libra
./scripts/dev_setup.sh! }; C7 E# E" Q* C) @
第一个Libra的“hello world"项目) t2 y& y8 u% M5 ~" b
使用以下命令,进入libra的开发环境
./scripts/cli/start_cli_testnet.sh
进入到libra的命令行
使用以下命令就可以创造你第一个帐户了3 D2 n. t v2 o6 q( u. D4 b0 i
create | c
成为第一个吐槽的人



