当前位置:网站首页>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
边栏推荐
猜你喜欢

Course design of simulated bank deposit and withdrawal management system in C language (pure C language version)
![Hamming code verification [simple and detailed]](/img/a4/2b1e7977fb0a7bf399a6209165e47d.jpg)
Hamming code verification [simple and detailed]

Docker installing MySQL

不给糖就捣蛋svg万圣节js特效

scikit-learn中的Scaler

粽子大战 —— 猜猜谁能赢

浅了解泛型机制

Data visualization practice: data processing
![[is the network you are familiar with really safe?] Wanziwen](/img/b4/6092ab3fd728e5d453ec38b089d027.png)
[is the network you are familiar with really safe?] Wanziwen

第13期:Flink零基础学习路线
随机推荐
Markdown mathematical grammar [detailed summary]
PyG教程(3):邻居采样
【查询数据表中第三行数据】
College entrance examination
Are you sure about this filter?
PyG教程(6):自定义消息传递网络
【JDBC從入門到實戰】JDBC基礎通關教程(全面總結上篇)
155-Solana存储数组
Niuke-top101-bm26
【JDBC从入门到实战】JDBC基础通关教程(全面总结上篇)
Required Integer parameter ‘XXX‘ is not present
Aurora8b10b IP usage-01-introduction and port description
How to access MySQL database through JDBC? Hand to hand login interface (illustration + complete code)
Excel_ submit
EasyUI monitors mouse press events & keyboard events [simple and detailed]
Docker installing MySQL
Butler-Volmer 公式的由来
Unity隐藏目录和隐藏文件
Basic use of JPA
File类的构造方法和各种常用的方法