- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我把 reqwest 库弄得一团糟,并想用 Rust Playground 尝试一些示例。我已经从网络上获取了最简单的示例之一,但是它没有编译。
请点击下面的链接,然后点击运行:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=fb0e7911a018ddb927cb13debd34fff4
这是控制台中显示的编译错误:
Compiling playground v0.0.1 (/playground)
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/playground/target/debug/deps/playground-552f473283bcb85e.playground.1fpw7zol-cgu.0.rcgu.o" "-o" "/playground/target/debug/deps/playground-552f473283bcb85e" "/playground/target/debug/deps/playground-552f473283bcb85e.4jwju6fs7xga1d77.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/playground/target/debug/deps" "-L" "/playground/target/debug/build/libsqlite3-sys-16200be2df74876c/out" "-L" "/playground/target/debug/build/ring-bb20fb99fa6aa7fb/out" "-L" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/playground/target/debug/deps/libfutures-e81e955c63e30b74.rlib" "/playground/target/debug/deps/libfutures_executor-cfdeba081d488308.rlib" "/playground/target/debug/deps/libreqwest-f9a05f7baf6db60c.rlib" "/playground/target/debug/deps/libcookie_store-140640047f1ead84.rlib" "/playground/target/debug/deps/libpublicsuffix-6ec6805d8d4576ca.rlib" "/playground/target/debug/deps/libregex-690a57b3d88f2f3e.rlib" "/playground/target/debug/deps/libthread_local-8d339f961a8cde82.rlib" "/playground/target/debug/deps/libregex_syntax-4b763771453cb6c9.rlib" "/playground/target/debug/deps/libaho_corasick-a90058961ca40ce7.rlib" "/playground/target/debug/deps/liberror_chain-bfc8e31e68aab259.rlib" "/playground/target/debug/deps/libbacktrace-1f6305b7986130af.rlib" "/playground/target/debug/deps/libobject-8fae803afce7a82f.rlib" "/playground/target/debug/deps/libaddr2line-4cb58e132c263024.rlib" "/playground/target/debug/deps/libobject-600bcc9a4024c890.rlib" "/playground/target/debug/deps/libflate2-7c0dda569caa75f2.rlib" "/playground/target/debug/deps/libminiz_oxide-06fcba964606bf52.rlib" "/playground/target/debug/deps/libadler-cf7f582a580fb2a1.rlib" "/playground/target/debug/deps/libcrc32fast-d8f8d6d441eb6dc8.rlib" "/playground/target/debug/deps/libwasmparser-18775bada4336335.rlib" "/playground/target/debug/deps/libgimli-e397da103aee7023.rlib" "/playground/target/debug/deps/libstable_deref_trait-33402efe82680c8b.rlib" "/playground/target/debug/deps/libfallible_iterator-2abec6be3aaf9504.rlib" "/playground/target/debug/deps/libcpp_demangle-af0e508f637e754e.rlib" "/playground/target/debug/deps/librustc_demangle-b0887c2590d815fd.rlib" "/playground/target/debug/deps/libcookie-212b7aa8adce5158.rlib" "/playground/target/debug/deps/libtime-fd9f56ac09845820.rlib" "/playground/target/debug/deps/libtime_macros-a8c33e90ea2139d7.rlib" "/playground/target/debug/deps/libstandback-f34bd7ec31cc9868.rlib" "/playground/target/debug/deps/libhyper_tls-9848d4b1ee8e7a27.rlib" "/playground/target/debug/deps/libipnet-8e33934d86be4d6e.rlib" "/playground/target/debug/deps/libtokio_native_tls-095fa4f445b9ada7.rlib" "/playground/target/debug/deps/libserde_urlencoded-c61505e8efe59184.rlib" "/playground/target/debug/deps/libencoding_rs-6db646af6aed58d2.rlib" "/playground/target/debug/deps/libserde_json-aaaea4d5f17e7bfd.rlib" "/playground/target/debug/deps/libryu-8177541eadb28761.rlib" "/playground/target/debug/deps/libbase64-263cbd5a5e64ab1a.rlib" "/playground/target/debug/deps/libmime_guess-eb8a1cb9893e4e18.rlib" "/playground/target/debug/deps/libunicase-b4234293fa194e2e.rlib" "/playground/target/debug/deps/libmime-f1104dec2de465c5.rlib" "/playground/target/debug/deps/libnative_tls-7028e32d0e94add2.rlib" "/playground/target/debug/deps/libopenssl_probe-7372e2218175cb8d.rlib" "/playground/target/debug/deps/libopenssl-84d1cdf5218f0b74.rlib" "/playground/target/debug/deps/libopenssl_sys-2038d81ad68cd2ed.rlib" "/playground/target/debug/deps/libforeign_types-37adb5bae539fda7.rlib" "/playground/target/debug/deps/libforeign_types_shared-22f2940fb592036b.rlib" "/playground/target/debug/deps/libbitflags-23cf02f711efe05e.rlib" "/playground/target/debug/deps/libhyper-430dd2c2e9afb7dd.rlib" "/playground/target/debug/deps/libwant-de668461c77b0f6d.rlib" "/playground/target/debug/deps/libtry_lock-30c95cee42568441.rlib" "/playground/target/debug/deps/libhttparse-ebba17a8d7f5b2dd.rlib" "/playground/target/debug/deps/libsocket2-abd46160d6c6c84a.rlib" "/playground/target/debug/deps/libh2-67e8c1f896ffcf25.rlib" "/playground/target/debug/deps/libtracing_futures-bfe252ef9bfa1357.rlib" "/playground/target/debug/deps/libindexmap-e59d655bbe32a039.rlib" "/playground/target/debug/deps/libhashbrown-89e2fd5a7081dfb3.rlib" "/playground/target/debug/deps/libahash-842a5b5404407a6a.rlib" "/playground/target/debug/deps/libconst_random-2c7202c77a6d1341.rlib" "/playground/target/debug/deps/libtokio_util-c597572dfab0a5a3.rlib" "/playground/target/debug/deps/libtower_service-25325533e6471f27.rlib" "/playground/target/debug/deps/libpin_project-85290df7927f46fd.rlib" "/playground/target/debug/deps/libhttpdate-7c9ae15df7de953a.rlib" "/playground/target/debug/deps/libtracing-1e9a893c023cc151.rlib" "/playground/target/debug/deps/libtracing_core-f4d747dfd45a5b1b.rlib" "/playground/target/debug/deps/libtokio-6caecbf8c961c6fc.rlib" "/playground/target/debug/deps/libsignal_hook_registry-464320536f92cd1a.rlib" "/playground/target/debug/deps/libnum_cpus-fa9405d418802dba.rlib" "/playground/target/debug/deps/libmio-8208b1b97ee75dd0.rlib" "/playground/target/debug/deps/libparking_lot-c70fd5290b63ba21.rlib" "/playground/target/debug/deps/libparking_lot_core-bec2d0cef1e036dd.rlib" "/playground/target/debug/deps/libsmallvec-be204749242d57d5.rlib" "/playground/target/debug/deps/liblock_api-9b94798a31b72387.rlib" "/playground/target/debug/deps/libscopeguard-9a7fcdcc3ef0c67a.rlib" "/playground/target/debug/deps/libinstant-801a426885a9fdfa.rlib" "/playground/target/debug/deps/libhttp_body-fa23070edd81973e.rlib" "/playground/target/debug/deps/libfutures_util-b297dd64f98a2e4a.rlib" "/playground/target/debug/deps/libmemchr-49ffcb39de512148.rlib" "/playground/target/debug/deps/libtokio_io-15767d74b5cad8b6.rlib" "/playground/target/debug/deps/libbytes-98612ff3704441d9.rlib" "/playground/target/debug/deps/libiovec-059f69bab14804ea.rlib" "/playground/target/debug/deps/liblibc-0a0510b4037c39f2.rlib" "/playground/target/debug/deps/libbyteorder-630514d63ec14067.rlib" "/playground/target/debug/deps/liblog-1181c8ecdf8fff43.rlib" "/playground/target/debug/deps/libcfg_if-ef24fecc97daf057.rlib" "/playground/target/debug/deps/libfutures-341be2426ac8006a.rlib" "/playground/target/debug/deps/libfutures_io-f642e5411fe1b621.rlib" "/playground/target/debug/deps/libslab-fae38ccb0866d90f.rlib" "/playground/target/debug/deps/libfutures_channel-ca57d40e72b73391.rlib" "/playground/target/debug/deps/libpin_project_lite-3a1c1edfcac5da66.rlib" "/playground/target/debug/deps/libfutures_sink-1e577cd08304b39b.rlib" "/playground/target/debug/deps/libfutures_task-285aea8d738140d9.rlib" "/playground/target/debug/deps/libonce_cell-49c2029294b89ee5.rlib" "/playground/target/debug/deps/libpin_utils-9d73d18d1a913b9e.rlib" "/playground/target/debug/deps/libfutures_core-3c03d3ccebe39c3b.rlib" "/playground/target/debug/deps/liblazy_static-a2d7352f0b2d8328.rlib" "/playground/target/debug/deps/liburl-3738c4378d8afb19.rlib" "/playground/target/debug/deps/libidna-44ceb179b4e434c3.rlib" "/playground/target/debug/deps/libunicode_normalization-7b85e62e0830fcdd.rlib" "/playground/target/debug/deps/libtinyvec-0fd102c28a026123.rlib" "/playground/target/debug/deps/libtinyvec_macros-373a732416c546b7.rlib" "/playground/target/debug/deps/libserde-f598327513f0f87c.rlib" "/playground/target/debug/deps/libunicode_bidi-a18e706d77b75aca.rlib" "/playground/target/debug/deps/libform_urlencoded-4539bb7bd3b31a2c.rlib" "/playground/target/debug/deps/libpercent_encoding-6c71419d296d9169.rlib" "/playground/target/debug/deps/libmatches-396398bf8ad55ae0.rlib" "/playground/target/debug/deps/libhttp-bc59be26651c0476.rlib" "/playground/target/debug/deps/libitoa-97b61b74c453bfb8.rlib" "/playground/target/debug/deps/libbytes-196811ca1432aaea.rlib" "/playground/target/debug/deps/libfnv-f0ba3a8dcbb1e827.rlib" "-Wl,--start-group" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-6f77337c1826707d.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-e238540f8faf9927.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-78f8506dd5004913.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-c0e64497deb085aa.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-217a514dc8d845c6.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-65e4f8df4b8bbd73.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-fec1b74170245419.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-e74f867eb2f15322.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-72a374d36f3d0a31.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-cb9206ed96de54c3.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-33ee81149d314805.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-2e8740599b11634b.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-241cf59851357bea.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-edc29aa8c04b480f.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-6a141406945fda5a.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-2408224b4af46d83.rlib" "-Wl,--end-group" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d36087076e1dd756.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
= note: collect2: fatal error: ld terminated with signal 9 [Killed]
compilation terminated.
error: aborting due to previous error
error: could not compile `playground`
To learn more, run the command again with --verbose.
D:\DANI\rust\projects\httpget>cargo run Compiling httpget v0.1.0 (D:\DANI\rust\projects\httpget)
Finished dev [unoptimized + debuginfo] target(s) in 2.80s
Running `target\debug\httpget.exe` Request: https://httpbin.org/ip thread 'main' panicked at 'not currently running on a Tokio 0.2.x runtime.', C:\Users\dani\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.25\src\runtime\handle.rs:118:28 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace error: process didn't exit successfully: `target\debug\httpget.exe` (exit code: 101)
我检查了Cargo.toml中的依赖项:
[dependencies]
error-chain = "0.12.4"
reqwest = { version = "0.10" }
tokio = { version = "1", features = ["full"] }
futures = "0.3"
我认为它与async/await运行时有关,但是我是Rust语言的新手,我在网络上发现的有关此问题的信息对我来说还不清楚。
最佳答案
这是reqwest版本的问题。将您的原始版本替换为
reqwest = { version = "0.11" }
在Cargo.toml中应将其修复在本地计算机上。
关于rust - Rust Playground和本地计算机中reqwest示例的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66409193/
有没有办法在不进行提交/ check out 的情况下应用差异补丁或类似补丁? 我的情况:我工作时经常在计算机之间切换,我的提交历史记录有一堆“switching machines”消息。 我最初的猜
我的自定义引导加载程序中有代码从地址 0x8E00 处的 512 字节缓冲区复制内存。进入高内存,0x100000和更高。这在某些计算机上运行良好,而在其他计算机上崩溃(我假设是三重故障)。此代码在
服务器有没有办法将一些数据无线无缝地推送到客户端,可能是 Windows(电话)、iPhone、Mac 或 Android 设备,没有任何操作系统集成? 如果是这样,最好的设计模式是什么,最好的技术是
我无法理解hadoop的真正本质。 如果我有足够的资源来购买可以处理PB级数据的 super 计算机,那么为什么我需要Hadoop基础架构来管理如此大的数据? 最佳答案 hadoop的全部目的是能够在
我有一个奇怪的问题,或者我可能无法理解Grails i18n机制的工作原理。 我将以下内容插入到index.gsp文件中: LocaleContextHolder.locale:
我正在尝试为我的小弟弟编写一个简单的程序。他经常在他的电脑后面,但他应该为学校学习简单的算术 :D 我想制作以下程序: 他启动了他的电脑 他需要做一些简单的练习并完成 如果他做对了 x 次,他可以继续
有人能告诉我如何在 diff 主机(计算机)上为 MySQL 数据库做一个简单的数据库备份吗?我正在尝试将我的数据库从一台主机(服务器)移动到一台新主机(服务器) 最佳答案 如果您只是需要在服务器之间
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 要求我们推荐或查找工具、库或最喜欢的场外资源的问题对于 Stack Overflow 来说是无关紧要的,因
我正在尝试让 Android 应用程序使用 USB 电缆与运行 ubuntu 12.04 lts 的 Linux 计算机进行通信。我正在尝试使用 usbdeviceconnection 类,但是当我通
我刚刚使用 docker-toolbox 1.8.2 安装了 docker在 Windows 10 上。 由于由于this issue我不得不使用这些命令重新创建 docker 镜像 docker-m
如何删除处于 GURU_MEDITATION 错误状态的 VirtualBox 计算机?在 VirtualBox 未运行时删除该目录是否足够? 编辑:发布后,我删除了“在文件管理器中显示”导航到的整个
当我们在 Azure 机器学习服务中将模型部署为 ACIWebService 时,不需要指定任何 deployment_target。 根据AzureML documentation对于 azurem
当我们在 Azure 机器学习服务中将模型部署为 ACIWebService 时,不需要指定任何 deployment_target。 根据AzureML documentation对于 azurem
我遇到的主要问题是当我选择 stay 时会发生什么上hand_one ,然后 hit上hand_two . 而不是让我hit or stay上hand_two再次,它让我回到hit or stay上h
我知道我可以使用 putty 来 ssh 进入每台 Linux 机器并更新 CentOS 服务器...但我希望有人能够为我指明正确的方向,告诉我如何通过 PowerShell 或 Windows 中的
在 MIX 计算机中,一个单词由五个字节和一个符号组成。符号在内存中是如何表示的?是另一个字节,所以每个字真的是六个字节吗? 谢谢。 最佳答案 你的问题不是很清楚。体系结构规范未指定实际实现。它仅指定
我是 Python 的初级程序员,我的电脑有一个奇怪的问题。当我的计算机上有一个 .py 文件(包含一个有效的脚本)并双击它打开时,会发生以下情况:程序打开(它是黑屏 View ),但它会在一秒钟内自
我正在尝试在 Windows 上使用 plink 创建到 Linux 机器的隧道,并让转储文件最终出现在 Windows 机器上。看起来 this answer会工作,是我的问题的基础。但是尝试一下并
我想在 Windows 7 和 10 计算机上执行重启,但我首先需要将 Jenkins 节点暂时离线。在执行重启之前,我需要完成所有正在运行的任务。然后我远程登录到服务器并重新启动计算机。然而,在我重
我正在编写一个简单的程序,从 MySQL 数据库中提取计算机名称,然后将这些名称存储到字符串数组列表中(这部分工作正常)。之后,我编写了一个类和一个方法,将字符串作为参数(这将是计算机名称)并尝试对其
我是一名优秀的程序员,十分优秀!