# Manual install on Windows - missing target libs

**URL:** <https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385>\
**Category:** help\
**Created:** [July 3, 2025, 10:21am UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385 "2025-07-03T10:21:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaclavpe](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vaclavpe](https://users.rust-lang.org/u/vaclavpe)\
**Post date:** [July 3, 2025, 10:21am UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/1 "2025-07-03T10:21:55Z")

</div>

Hi,

I installed Rust on my laptop with Windows the manual way (unpack from the archive) as I do not have the administration rights and rustup failed to install.  
I set up the PATH to rustc and cargo and I am able to compile with "rustc -L c:\opt\rust-1.87.0-x86\_64-pc-windows-gnu\rust-std-x86\_64-pc-windows-gnu\lib\rustlib\x86\_64-pc-windows-gnu\lib\ main.rs"

But I am not able to run the "cargo build". Cargo is missing the library setup:

> cargo build  
> Downloaded bmp v0.5.0  
> Downloaded byteorder v1.5.0  
> Downloaded 2 crates (35.1KiB) in 0.98s  
> Compiling byteorder v1.5.0  
> error[E0463]: can't find crate for `std`  
> |  
> = note: the `x86_64-pc-windows-gnu` target may not be installed

Which environmental variables shall I set for cargo? Thank you.

---

<div class="post-metadata">

**Author:** ![bjorn3](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/bjorn3/32/5255_2.png) [@bjorn3](https://users.rust-lang.org/u/bjorn3)\
**Post date:** [July 3, 2025, 10:56am UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/2 "2025-07-03T10:56:56Z")

</div>

Did you download the combined tarball ([https://static.rust-lang.org/dist/rust-1.88.0-x86\_64-pc-windows-gnu.tar.xz](https://static.rust-lang.org/dist/rust-1.88.0-x86_64-pc-windows-gnu.tar.xz))? If so this contains all the various components that form a rust toolchain in separate directories. There is an install script in the root of the archive that combines those directories into a single toolchain. Alternatively you can merge the contents of all the directories inside the main `rust-1.87.0-x86_64-pc-windows-gnu` directory into a single directory.

---

<div class="post-metadata">

**Author:** ![vaclavpe](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vaclavpe](https://users.rust-lang.org/u/vaclavpe)\
**Post date:** [July 3, 2025, 11:46am UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/3 "2025-07-03T11:46:36Z")

</div>

Yes, I did it from the tarball. I can see the install script but it is linux-kind. I am not able to run it on Windows.  
I believe there must be %CARGO\_SOMETHING% variable (or something similar) which points to the libraries in the installation... I tried to set LD\_LIBRARY\_PATH but it seems unused by cargo...

---

<div class="post-metadata">

**Author:** ![nerditation](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nerditation](https://users.rust-lang.org/u/nerditation)\
**Post date:** [July 3, 2025, 12:01pm UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/4 "2025-07-03T12:01:58Z")

</div>

> [@vaclavpe](#):
>
> I do not have the administration rights and rustup failed to install

`rustup` doesn't need administrator permission to install, can you describe how `rustup` failed? what's the error message you see?

---

<div class="post-metadata">

**Author:** ![vaclavpe](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vaclavpe](https://users.rust-lang.org/u/vaclavpe)\
**Post date:** [July 3, 2025, 12:34pm UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/5 "2025-07-03T12:34:03Z")

</div>

It failed to install pre-requisities. But to be honest, I did it two weeks ago and started to learn the language. I was happy to run at least rustc with "-L". But today I wanted to import other crates and got stuck with cargo.

---

<div class="post-metadata">

**Author:** ![nerditation](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nerditation](https://users.rust-lang.org/u/nerditation)\
**Post date:** [July 3, 2025, 1:13pm UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/6 "2025-07-03T13:13:06Z")

</div>

> [@vaclavpe](#):
>
> It failed to install pre-requisities

try figure out the cause and fix it. for a new learner without any experience, it would be better to stick to `rustup`.

> [@vaclavpe](#):
>
> I can see the install script but it is linux-kind. I am not able to run it on Windows.

if you want to go the manual route, you can manually merge all the component directories, e.g., each component has it's own directory containing sub-directories like `bin`, `lib`, `share`, etc, you should move the contents from each component directory into a single directory, i.e. you should end up with a single directory, which contains `bin`, `lib`, `share`, and so on.

---

<div class="post-metadata">

**Author:** ![vaclavpe](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vaclavpe](https://users.rust-lang.org/u/vaclavpe)\
**Post date:** [July 4, 2025, 7:04am UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/7 "2025-07-04T07:04:35Z")

</div>

> try figure out the cause and fix it.

Visual Studio installer requires the admin rights. I do not have it. If I do not install the VC++ prereqs what are the consequences ? Will rust/cargo work ?

---

<div class="post-metadata">

**Author:** ![nerditation](https://avatars.discourse-cdn.com/v4/letter/n/e79b87/32.png) [@nerditation](https://users.rust-lang.org/u/nerditation)\
**Post date:** [July 4, 2025, 7:26am UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/8 "2025-07-04T07:26:09Z")

</div>

> [@vaclavpe](#):
>
> If I do not install the VC++ prereqs what are the consequences ?

VC++ is only required by the `*-windows-msvc` toolchain, but you can install the toolchain of the `*-windows-gnu` abi without VC++. e.g. rename the downloaded `rustup-init.exe` to `rustup.exe` then run:

```sh
$ rustup toolchain install stable-x86_64-pc-windows-gnu

```

see:

> **[Windows - The rustup book](https://rust-lang.github.io/rustup/installation/windows.html)**

note, the `*-windows-gnu` toolchain is self-contained with a linker and necessary libraries. however, I recommend to also install `msys2/mingw64` so you can use ffi, but it is NOT required for _pure_ rust code. `msys2/mingw64` does not require administrator rights to install.

---

<div class="post-metadata">

**Author:** ![Redglyph](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/redglyph/32/27961_2.png) [@Redglyph](https://users.rust-lang.org/u/Redglyph)\
**Post date:** [July 4, 2025, 7:47am UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/9 "2025-07-04T07:47:00Z")

</div>

The gnu toolchain is slower to compile and run tests, though. I advise you to ask your admin to install MSVC. Since 2022, it's possible to minimize their interaction to update or modify the VS content, at least ([ref](https://devblogs.microsoft.com/visualstudio/visual-studio-2022-17-7-preview-2-is-here/#enterprise-management)).

---

<div class="post-metadata">

**Author:** ![vaclavpe](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vaclavpe](https://users.rust-lang.org/u/vaclavpe)\
**Post date:** [July 4, 2025, 8:22am UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/10 "2025-07-04T08:22:27Z")

</div>

> c:\Users\vaclavpe\Downloads\>rustup-init toolchain install stable-x86\_64-pc-windows-gnu  
> error: error: unexpected argument 'toolchain' found  
> Usage: rustup-init[EXE] [OPTIONS]  
> For more information, try '--help'.

The parameters seem not working but then I was able to choose the GNU installation option. Now it seems that cargo works properly - it was able to download the external dependencies and compile them.

Thank you for help!

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [October 2, 2025, 8:22am UTC](https://users.rust-lang.org/t/manual-install-on-windows-missing-target-libs/131385/11 "2025-10-02T08:22:44Z")

</div>

Closed on October 2, 2025, 8:22am UTC

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
