勉強用にサクっと実行できる環境があれば嬉しかったのだが……。
手順
1. インストール
$ cargo install evcxr_repl
失敗した……。以下ログ。
Updating crates.io index Downloaded evcxr_repl v0.3.3 Downloaded 1 crates (7.9 KB) in 2.21s Installing evcxr_repl v0.3.3 Downloaded rustyline v3.0.0 Downloaded failure v0.1.5 Downloaded dirs v1.0.5 Downloaded colored v1.8.0 Downloaded evcxr v0.3.3 Downloaded regex v1.1.2 Downloaded lazy_static v1.3.0 Downloaded unicode-width v0.1.5 Downloaded unicode-segmentation v1.3.0 Downloaded backtrace v0.3.18 Downloaded failure_derive v0.1.5 Downloaded log v0.4.6 Downloaded utf8parse v0.1.1 Downloaded nix v0.11.0 Downloaded memchr v2.2.0 Downloaded aho-corasick v0.6.10 Downloaded thread_local v0.3.6 Downloaded rustc-demangle v0.1.14 Downloaded syn v0.15.27 Downloaded utf8-ranges v1.0.2 Downloaded cfg-if v0.1.9 Downloaded proc-macro2 v0.4.27 Downloaded winconsole v0.10.0 Downloaded tempfile v3.0.7 Downloaded synstructure v0.10.2 Downloaded libloading v0.5.0 Downloaded regex-syntax v0.6.6 Downloaded backtrace-sys v0.1.28 Downloaded quote v0.6.12 Downloaded json v0.11.13 Downloaded void v1.0.2 Downloaded sig v1.0.0 Downloaded unicode-xid v0.1.0 Downloaded bitflags v1.0.4 Downloaded ucd-util v0.1.3 Downloaded remove_dir_all v0.5.1 Downloaded cc v1.0.37 Downloaded rgb v0.8.13 Downloaded cgmath v0.16.1 Downloaded winapi v0.3.7 Downloaded approx v0.1.1 Downloaded num-traits v0.1.43 Downloaded rand v0.4.6 Downloaded num-traits v0.2.6 Compiling proc-macro2 v0.4.27 Compiling unicode-xid v0.1.0 Compiling cc v1.0.37 Compiling num-traits v0.2.6 Compiling autocfg v0.1.2 Compiling libc v0.2.55 Compiling rand_core v0.4.0 Compiling memchr v2.2.0 Compiling cgmath v0.16.1 Compiling failure_derive v0.1.5 Compiling winapi v0.3.7 Compiling lazy_static v1.3.0 Compiling ucd-util v0.1.3 Compiling approx v0.1.1 Compiling regex v1.1.2 Compiling cfg-if v0.1.9 Compiling rustc-demangle v0.1.14 Compiling nix v0.11.0 Compiling utf8-ranges v1.0.2 Compiling bitflags v1.0.4 Compiling remove_dir_all v0.5.1 Compiling rgb v0.8.13 Compiling void v1.0.2 Compiling json v0.11.13 Compiling unicode-segmentation v1.3.0 Compiling utf8parse v0.1.1 Compiling unicode-width v0.1.5 Compiling rand_chacha v0.1.1 Compiling rand_pcg v0.1.2 Compiling rand v0.6.5 Compiling backtrace v0.3.18 Compiling rand_core v0.3.1 Compiling rand_jitter v0.1.4 Compiling thread_local v0.3.6 Compiling regex-syntax v0.6.6 Compiling backtrace-sys v0.1.28 Compiling libloading v0.5.0 Compiling log v0.4.6 Compiling rand_xorshift v0.1.1 Compiling rand_hc v0.1.0 Compiling rand_isaac v0.1.1 Compiling rand v0.4.6 Compiling rand_os v0.1.3 error[E0425]: cannot find value `PTRACE_GETFPXREGS` in module `libc` --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.11.0/src/sys/ptrace.rs:77:9 | 77 | PTRACE_GETFPXREGS, | ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists | 77 | PTRACE_GETFPREGS, | ^^^^^^^^^^^^^^^^ help: possible candidate is found in another module, you can import it into scope | 3 | use sys::ptrace::Request::PTRACE_GETFPXREGS; | error[E0425]: cannot find value `PTRACE_SETFPXREGS` in module `libc` --> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.11.0/src/sys/ptrace.rs:84:9 | 84 | PTRACE_SETFPXREGS, | ^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists | 84 | PTRACE_SETFPREGS, | ^^^^^^^^^^^^^^^^ help: possible candidate is found in another module, you can import it into scope | 3 | use sys::ptrace::Request::PTRACE_SETFPXREGS; | Compiling dirs v1.0.5 Compiling sig v1.0.0 Compiling num-traits v0.1.43 Compiling quote v0.6.12 Compiling aho-corasick v0.6.10 error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0425`. error: Could not compile `nix`. warning: build failed, waiting for other jobs to finish... error: failed to compile `evcxr_repl v0.3.3`, intermediate artifacts can be found at `/tmp/cargo-install65WhhM` Caused by: build failed
ビルドエラー。要点を抜き出すと以下。
Compiling rand_os v0.1.3 error[E0425]: cannot find value `PTRACE_GETFPXREGS` in module `libc` error[E0425]: cannot find value `PTRACE_SETFPXREGS` in module `libc` For more information about this error, try `rustc --explain E0425`. error: Could not compile `nix`. build failed
libc
ってなに?nix
ってパッケージマネージャ?
どうすれば解決できるかわからん。諦めた。
情報源
対象環境
- Raspbierry pi 3 Model B+
- Raspbian stretch 9.0 2018-11-13
- bash 4.4.12(1)-release
- rustc 1.34.2 (6c2484dc3 2019-05-13)
- cargo 1.34.0 (6789d8a0a 2019-04-01)
$ uname -a Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
前回まで
- Rustを学んでみたい(プログラミング言語)
- Rustの環境構築
- RustでHelloWorld
- Rustの和訳ドキュメント
- Cargoでプロジェクト作成・ビルド・実行
- クレートとは?
- Rustで関数を使ってみる
- Rustでモジュールを使ってみる
- Rustで乱数を生成する(rand)
- Rustで標準入力する(std::io::stdin().read_line())
- RustでMatch判定する(match)
- Rustでprintとread_lineを1行にする方法
- Rustで数当てゲーム
- クレート名にドット.が使えない
- Rustの変数と可変性(let, mut) error[E0384]: cannot assign twice to immutable variable
x
- Rustのimmutable束縛とconst定数の違い