#5035·rustup

(Windows) 在非 ANSI 路径下运行 `rustup doc` 时出现"系统无法找到指定的文件。(操作系统错误 2)"

作者: SnipUndercover创建于 2026年8月26日更新于 2026年9月6日
标签bugnot-rustupO-windowsdependencies
  1. Have a user with a non-ANSI character in their username (for example, ł)
  2. Probably important: Change the locale encoding to UTF-8
  • Open the region control panel applet
  • Open the Run menu (Win+R)
  • Enter intl.cpl
  • Press Enter
  • Open the "Administrative" tab
  • Click "Change system locale..."
  • Check the "Beta: Use Unicode UTF-8 for worldwide language support" checkbox
  • Restart the PC
  1. Download rustup-init and install rustup with default settings
  2. Run rustup doc --book
  3. Get really sad

内容来源: rust-lang/rustup