当前位置:网站首页>156 rust and Solana environment configuration
156 rust and Solana environment configuration
2022-06-21 06:39:00 【Lich Howger】
Let's talk about rust and solana Environment configuration
Why should I repeat rust and solana Environment configuration
Because I bought a new computer two days ago
Now we need to do something about the environment
So I'll keep a record of the environment
Ha ha ha
Next one first rust
And then install it
then rustc --version
Look at the version
Look again. cargo edition
cargo --version
And then we use cargo Try to create a project
cargo new my_cargo_test
Then let's run
cargo run
I found the wrong report
D:\Project\rust\lich_cargo_test>cargo run
Compiling lich_cargo_test v0.1.0 (D:\Project\rust\lich_cargo_test)
error: linker `link.exe` not found
|
= note: program not found
note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that VS 2013, VS 2015, VS 2017, VS 2019 or VS 2022 was installed with the Visual C++ option
error: could not compile `lich_cargo_test` due to previous error
link.exe not found
This is because we didn't install c++ Running environment
But install gccg++ The environment is a little troublesome
I won't pretend
And in the back windows Run up solana It's not convenient
Let's do it another way
Just use wsl
Now let's install it wsl
Let's refer to this document
Install Ubuntu on WSL2 on Windows 10 | UbuntuUbuntu is an open source software operating system that runs from the desktop, to the cloud, to all your internet connected things.
https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#1-overview Follow the process step by step
We open it as an administrator powershell
then
wsl --install
Wrong report here
PS C:\Windows\system32> wsl --install
wsl : Cannot be “wsl” Item identified as cmdlet、 function 、 The name of the script file or runnable program . Please check the spelling of the name
Write , If the path is included , Please make sure the path is correct , then try again .
The position of That's ok :1 character : 1
+ wsl --install
+ ~~~
+ CategoryInfo : ObjectNotFound: (wsl:String) [], CommandNotFoundExcept
ion
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\Windows\system32>We open the control panel
Turn on or off windows function
Or you can search directly to find
then

We enable this
Apply to linux Of windows Subsystem
If you are in a checked state , Just cancel , Restart
Then open it again , Restart again
Then our administrator runs powershell
wsl --install
Or we turn on microsoft store
Search for ubuntu Direct installation
Now we are ubuntu Put it inside rust
wsl
sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shInstallation successful
Then let's install it gccg++ Environmental Science
sudo apt update
Update and install
sudo apt install build-essential
It is really very slow very slow very slow very slow very slow very slow very slow
But I don't know how to solve it
in apt There will be other problems if the image of
Hey, I'm so annoyed
It's finished
Run it
cargo run
[email protected]:/mnt/d/Project/rust/lich_cargo_test$ cargo run
Compiling lich_cargo_test v0.1.0 (/mnt/d/Project/rust/lich_cargo_test)
Finished dev [unoptimized + debuginfo] target(s) in 0.58s
Running `target/debug/lich_cargo_test`
Hello, world!
Then we'll install solana cli
sh -c "$(curl -sSfL https://release.solana.com/v1.10.24/install)"
Or download the compressed package directly
https://github.com/solana-labs/solana/releases/tag/v1.10.24I downloaded it to windows Local
Then copy it to wsl
cp /mnt/d/solanaxxxxx ./
And unzip it
tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2
And then configure it ln
sudo ln -s /home/abc/solana/bin/solana /usr/local/bin
then
solana --version
Get it done
边栏推荐
猜你喜欢

TweenMax示波器3d动画

Contos7 installing SVN server

TypeError: iter() returned non-iterator of type ‘xxx‘

利用burp进行爆破(普通爆破+验证码爆破)

超参数和模型参数

FPGA - 7 Series FPGA selectio -02- introduction to source language

College entrance examination
![[JDBC from starting to Real combat] JDBC Basic clearance tutoriel (Summary of the first part)](/img/70/9ccd367a24a8ef399a7f2cf425a2bb.png)
[JDBC from starting to Real combat] JDBC Basic clearance tutoriel (Summary of the first part)

My college entrance examination experience and summary

浅了解泛型机制
随机推荐
Leetcode database mysql topic (difficulty: simple)
第12期:Spark零基础学习路线
【JS】截取字符串
c技能树评测
College entrance examination
Direct attack on the Internet layoffs in 2022: flowers on the ground, chicken feathers on the ground
[JDBC from introduction to actual combat] JDBC basic customs clearance tutorial (comprehensive summary part I)
Issue 7: roll inside and lie flat. How do you choose
[data mining] final review Chapter 2
Sqlmap工具
User defined thread pool
小程序【第一期】
PyG教程(1):初识Pytorch Geometric
粽子大战 —— 猜猜谁能赢
EasyUI监听鼠标按下事件&监听键盘事件【简单详细】
超参数和模型参数
我的高考经历与总结
Why should I use the source code of nametuple replace(‘,‘, ‘ ‘). Split() instead of split(‘,‘)
五层参考模型各层总结
MySQL数据库基础:子查询