Solana hello_world problem on Windows 10/WSL2/Ubuntu 18.04

Viewed 1822

I'm trying to follow this tutorial.

I'm running a WSL2 Ubuntu18.04 machine in a Windows 10 system and am stuck when running this line:

$ solana-test-validator

This is the output I get:

Ledger location: test-ledger
Log: test-ledger/validator.log
Unable to connect to validator: Client error: test-ledger/admin.rpc does not exist

Any clues about what can be wrong?

4 Answers

So do follow this link for more explanation https://github.com/solana-labs/example-helloworld/issues/294

But to clarify something that was not clear for me from this Answer. All you need to do is run the solana-test-validator from the home dir in your WSL2. I did not need to reinstall all of the dependencies to get it running correctly.

When starting your WSL terminal the starting directory is /mnt/c/... you need to cd ~/ and then run solana-test-validator.

Before running solana-test-validator, you need to cd ~/ and then run solana-test-validator.

screenshot

I just reinstalled the whole WSL, after that when reinstalling the necessary dependencies for the tutorial (nodejs, npm, rust and solana) make sure to change directories to the WSL home folder (by default it opens on the mounted windows system).

https://github.com/solana-labs/example-helloworld/issues/294 (Github issue with more info)

For me, it is solved by downgrading solana-cli from v1.8.3 to v1.7.17.

It troubled be for several days.

It may not be the same condition to this question.

But I help it will help someone.

Related