Debust 9.2システムでthe instructions in the documentationを使用してRustをインストールし、compile the hello world exampleを試しました。コンパイルが次のエラーで失敗しました:Debianでの錆9.2 Impureライブラリによるエラー
$ rustc main.rs --verbose
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "main.main0.rust-cgu.o" "main.main1.rust-cgu.o" "-o" "main" "main.crate.allocator.rust-cgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-fe0b1b991511fcaa.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-3d7b10e850a67e89.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-28484309357fd6f1.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-751808ba756769d5.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-8cb97051d8238386.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-25cc9b024a02d330.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-d42e80cee81b06ce.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-78c21267a2dc15c1.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-0e1b544c94586415.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0c5e3d6c117f8c44.rlib" "/home/frederick/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-bd7cc5ada1e908e0.rlib" "-Wl,-Bdynamic" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util"
= note: ld-wrapper: error: attempt to use impure library "/usr/lib/gcc/x86_64-linux-gnu/6/libgcc_s.so"
collect2: error: ld returned 1 exit status
次は私がGoogleで次の検索を試みたが、有益な何かを見つけるように見えることはできません私のシステムで
Linux localhost 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
をuname -a
を実行しているの出力です:
- rustcとLD-ラッパー:エラー:不純なライブラリを使用しようとする試み
- rustcとLD-ラッパー:エラー:attem
- "/usr/lib/gcc/x86_64-linux-gnu/6/libgcc_s.so" rustcとエラー不純なライブラリを使用するPT:
cc
との連携に失敗しました:終了コード:1
カーネルがあり、ディストリビューションが提供するパッケージ/ライブラリがあります。私は 'lsb_release -a'を報告しました' Description:\t Debian GNU/Linux 9.3(stretch) '。インストールスクリプトのように、 "debian"ではなく "ubuntu"のようなハードコーディングされた文字列を探すのが簡単かもしれません。もしあなたが周りを突き進むなら、役に立つパッチを作るでしょう。 –
最終的に、私はシステムrustcをunistalledし、GNU Guix経由でrustcをインストールしましたが、それはほとんどの人にとって複雑なプロセスです。私は[バグを報告しました](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884775)うまくいけばそれは修正されました – fredmanglis