1. mk-tool

    Posted

    mk-tool
Changes in title
+【Rust】WebフレームワークRocketを動かしたときのエラー
Changes in tags
Changes in body
Source | HTML | Preview
@@ -0,0 +1,55 @@
+# 概要
+RustのWebフレームワークを使ったときにエラーが出たのでメモ。[Rockerのドキュメント](https://rocket.rs/guide/quickstart/#running-examples)のクイックスタートをやってみました。
+エラー内容は長いので記事の最後に記載します。問題の解決方法としては`cargo rust`を実行するときにrustのnightly版を使って実行すれば解決できますが、nightlyの使い方を知るまでに時間がかかりました。
+
+環境:windows10
+
+# やったこと
+nightlyをinstall
+
+```
+rustc install nightly
+```
+
+nightlyをつかう。
+
+```
+cargo +nightly run
+```
+
+これで実行できた。
+
+#エラー内容
+
+```
+error: failed to run custom build command for `rocket_codegen v0.3.8 (file:///xxx/rust/Rocket/codegen)`
+process didn't exit successfully: `xxx\rust\Rocket\target\debug\build\rocket_codegen-d2d1541e746ad235\build-script-build` (exit code: 101)
+--- stderr
+?[1;31mError:?[0m ?[37mRocket requires a nightly or dev version of Rust.?[0m
+?[37mInstalled version is:?[0m ?[33m1.25.0 (2018-03-25)?[0m. ?[37mMinimum required:?[0m ?[33m1.27.0-nightly (2018-04-06)?[0m.
+?[34mSee the getting started guide (?[0m?[37mhttps://rocket.rs/guide/getting-started/?[0m?[34m) for more information.?[0m
+thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', codegen\build.rs:38:17
+note: Run with `RUST_BACKTRACE=1` for a backtrace.
+
+warning: build failed, waiting for other jobs to finish...
+error: failed to run custom build command for `pear_codegen v0.0.16`
+process didn't exit successfully: `xxx\rust\Rocket\target\debug\build\pear_codegen-a28c5dcc6703d3d8\build-script-build` (exit code: 101)
+--- stderr
+?[1;31mError:?[0m ?[37mPear requires a nightly or dev version of Rust.?[0m
+?[37mInstalled version is:?[0m ?[33m1.25.0 (2018-03-25)?[0m. ?[37mMinimum required:?[0m ?[33m1.27.0-nightly (2018-04-14)?[0m.
+thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', xxx\.cargo\registry\src\github.com-1ecc6299db9ec823\pear_codegen-0.0.16\build.rs:31:13
+note: Run with `RUST_BACKTRACE=1` for a backtrace.
+
+warning: build failed, waiting for other jobs to finish...
+error: failed to run custom build command for `rocket v0.3.8 (file:///xxx/rust/Rocket/lib)`
+process didn't exit successfully: `xxx\rust\Rocket\target\debug\build\rocket-c96e4e05a2a699a0\build-script-build` (exit code: 101)
+--- stderr
+?[1;31mError:?[0m ?[37mRocket requires a nightly or dev version of Rust.?[0m
+?[37mInstalled version is:?[0m ?[33m1.25.0 (2018-03-25)?[0m. ?[37mMinimum required:?[0m ?[33m1.27.0-nightly (2018-04-03)?[0m.
+?[34mSee the getting started guide (?[0m?[37mhttps://rocket.rs/guide/getting-started/?[0m?[34m) for more information.?[0m
+thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', lib\build.rs:38:13
+note: Run with `RUST_BACKTRACE=1` for a backtrace.
+
+warning: build failed, waiting for other jobs to finish...
+error: build failed
+```