# StarNode更新教程 **Published by:** [Rain](https://paragraph.com/@rain-2/) **Published on:** 2022-07-18 **URL:** https://paragraph.com/@rain-2/starnode ## Content 运行StarNode主要是使用PathFinder https://github.com/eqlabs/pathfinder 是源码进行下载编译后,使用编译生成的文件运行。 所以要更新时 ,应更新源码,进行重新编译生成,再执行运行操作步骤:停止当前pathfinder,使用”ctrl + c”进行停止2.进入pathfinder源码目录,并进行更新// 进入到pathfinder所在目录 cd pathfinder目录 // 查看pathfinder的源码仓库地址 git remote -v git status查看当前源码版本;git remote -v查看源码仓库地址3.获取新的源码,切换到最新版本// 获取新的源码 git pull // 切换到当前最新的代码版本 // 最新的代码版本可以通过仓库地址查看,如下图在Release下是最新代码版本 git checkout 最新代码版本 // 示例:git checkout v0.2.5-alpha 更新依赖(因为当前教程只是讲解更新,所以假设Ruse、Python已经安装完成)// 进入pathfinder下的py目录 cd py // 激活python虚拟环境 source .venv/bin/activate // 更新PIP,通常不需要 PIP_REQUIRE_VIRTUALENV=true pip install --upgrade pip // 更新项目的依赖,必须操作(因为可能新版本会有其他代码仓库依赖) PIP_REQUIRE_VIRTUALENV=true pip install -r requirements-dev.txt 测试// 进行测试,如下图提示14 passed, 1 skipped,只要没有error都是可以的 pytest 编译cargo build --release --bin pathfinder 运行source py/.venv/bin/activate cargo run --release --bin pathfinder -- <pathfinder options> 测试、编译、运行 ## Publication Information - [Rain](https://paragraph.com/@rain-2/): Publication homepage - [All Posts](https://paragraph.com/@rain-2/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@rain-2): Subscribe to updates