以太坊2.0客户端(Prysm,lighthouse)安装体验

本文分享了在Windows和Ubuntu上安装以太坊2.0客户端Lighthouse与Prysm的体验。在Windows上,Lighthouse的Rust环境配置复杂,可能不支持Windows开发。而在Ubuntu上,Lighthouse安装迅速但遇到编译问题。Prysm的安装相对简单,直接运行即可,适合仅需验证节点的用户。对于Prysm的源码研究,需要设置代理才能正常下载和运行测试用例。
摘要由CSDN通过智能技术生成

以太坊2.0最新的测试网里面,这两个客户端的受众最多,下面是我的一些安装和代码体验。

Lighthouse安装

首先体验了Lighthouse的安装,Lighthouse是基于Rust开发的,可查看下面官方提供的文档
LightHouse官方安装指南

Windows上安装

Rust在win上面安装比在Linux下面麻烦很多,经历了如下操作。

  • Download and install “Build Tools for Visual Studio:”
    You can get it at this link: https://aka.ms/buildtools.
    Run the installation file: vs_buildtools.exe.
    Ensure the “Windows 10 SDK” component is included when installing the Visual C++ Build Tools.
    Restart your computer.
  • Install LLVM: https://releases.llvm.org/download.html
  • Install OpenSSL with vcpkg:
  • Finally, install cmake: https://cmake.org/download/
mkdir C:\Tools
cd C:\Tools
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg.exe install openssl:x64-windows-static

安装OpenSSL的时候使用vcpkg无法安装,下载了安装包OpenSSL-Win64,手动配置了环境变量。

OPENSSL_DIR  D:\Program Files\OpenSSL-Win64
PATH %OPENSSL_DIR%\bin

配置完这些发现,使用cargo build还是不能编译

error[E0433]: failed to resolve: could not find `unix` in `os`
 --> C:\Users\mec\.cargo\registry\src\github.com-1ecc6299db9ec823\leveldb-sys-2.0.5\src/build.rs:6:14
  |
6 | use std::os::unix::fs::PermissionsExt;
  |              ^^^^ could not find `unix` in `os`

error[E0599]: no method named `mode` found for struct `std::fs::Permissions` in the current scope
   --> C:\Users\mec\.cargo\registry\src\github.com-1ecc6299db9ec823\leveldb-sys-2.0.5\src/build.rs:178:30
    |
178 |     let current_mode = p
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值