Problem making a test Solana Smart Contract


I tried to build and deploy a test Solana Smart Contract following the procedure described here:

At this stage:

npm run build:program-rust

– I got a log message with an error:

helloworld@0.0.1 build:program-rust
cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program

BPF SDK: \?\C:\Users\Alexey Guryev.local\share\solana\install\releases\1.9.9\solana-release\bin\sdk\bpf
cargo-build-bpf child: rustup toolchain list -v
cargo-build-bpf child: rustup toolchain uninstall bpf
info: uninstalling toolchain ‘bpf’
info: toolchain ‘bpf’ uninstalled
cargo-build-bpf child: rustup toolchain link bpf \?\C:\Users\Alexey Guryev.local\share\solana\install\releases\1.9.9\solana-release\bin\sdk\bpf\dependencies\bpf-tools\rust
cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release
error: failed to run rustc to learn about target-specific information

Caused by:
process didn’t exit successfully: rustc - --crate-name ___ --print=file-names -C lto=no -C linker=\\?\C:\Users\Alexey Guryev\.local\share\solana\install\releases\1.9.9\solana-release\bin\sdk\bpf\dependencies\bpf-tools\llvm\bin\ld.lld --target bpfel-unknown-unknown --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg (exit code: 1)
— stderr
error: multiple input filenames provided (first two filenames are - and Guryev\.local\share\solana\install\releases\1.9.9\solana-release\bin\sdk\bpf\dependencies\bpf-tools\llvm\bin\ld.lld)

  • The problem was caused, as far as I understood, by whitespace character in the user’s home directory name. (The single path was considered two paths and that resulted in the error).

So my question is: Can I fix that without renaming the user’s home directory? Is there any script that I could edit?

Thanks in advance,
Alexey Guryev

Check out your direct message for help

try this command :
sh -c “$(curl -sSfL” && export PATH="~/.local/share/solana/install/active_release/bin:$PATH"