当我在Mac OS Monterey上安装并运行Tauri时,立即出现错误。

huangapple go评论110阅读模式
英文:

When I install and run Tauri on Mac OS Monterey I get immediate error

问题

我通过以下方式安装了它:

npm create tauri-app

我选择了一个纯粹的JavaScript环境来编写它。

然后我运行了:

cd app
npm install
npm run tauri dev

结果出现了这个错误:

> app@0.0.0 tauri
> tauri dev

线程 '<unnamed>' 在 `Result::unwrap()` 上发生了 panic,但是这个 `Err` 值是:Os { code: 2, kind: NotFound, message: "No such file or directory" }',来源:src/interface/rust.rs:762:69
提示:使用 `RUST_BACKTRACE=1` 环境变量运行,以显示回溯信息

我使用的是 Mac OS Monterey。

我在网上搜索了这个错误,似乎与我的系统时间配置有关,但我不确定。

英文:

I installed it via:

npm create tauri-app

I chose a vanilla JavaScript environment to code it.

I run:

  cd app
  npm install
  npm run tauri dev

The result is this error:

> app@0.0.0 tauri
> tauri dev

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/interface/rust.rs:762:69
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I am on Mac OS Monterey.

I searched the error online and it seems it might have something to do with
my systems time configuration but I am unsure.

答案1

得分: 5

你需要在安装Tauri之前安装Rust。安装Tauri不包括Rust。

根据Rust的文档,安装指南如下:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

英文:

You need to install Rust before Tauri. Installing Tauri does not include Rust.

Installation instructions, according to Rust's documentation:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

答案2

得分: 4

以下是翻译好的部分:

答案是

cargo install tauri-cli

这将安装 tauri 命令以及用于执行 tauri 应用程序的 CLI。

这将只安装 Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
英文:

The answer is

cargo install tauri-cli

this install the tauri command, and cli to be able to execute the tauri app.

this installs just rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

答案3

得分: 0

根据平台不同,有一些步骤需要采取来修复这个问题,这些步骤仅在首次创建 Tauri 应用时需要。

对于 macOS
步骤 1:安装 CLang 和 macOS 开发依赖项,使用以下命令:

xcode-select --install

步骤 2:安装 Rust,使用以下命令:

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

查看官方文档获取更多信息:https://tauri.app/v1/guides/getting-started/prerequisites

英文:

Depending on the platform, there are some steps to take to fix that which is only required for the first time you are creating Tauri app

For MacOs
Step 1: Install CLang and macOS Development Dependencies using

xcode-select --install

Step 2: Install Rust using

curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

Check out official docs for more at https://tauri.app/v1/guides/getting-started/prerequisites

huangapple
  • 本文由 发表于 2023年1月5日 11:17:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/75013520.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定