Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在linux vps上,运行cargo build --release遇错 #1

Closed
luckypoem opened this issue Mar 30, 2020 · 2 comments
Closed

在linux vps上,运行cargo build --release遇错 #1

luckypoem opened this issue Mar 30, 2020 · 2 comments

Comments

@luckypoem
Copy link

hi.

[root@bwg-vps bit-tunnel-by-bit-ranger]# cargo build --release
Updating crates.io index
Fetch [==========================================> ] 79.79%
Downloaded rand v0.7.3
Downloaded getopts v0.2.21
Downloaded futures-timer v1.0.3
Downloaded async-std v1.5.0
Downloaded rust-crypto v0.2.36
Downloaded getrandom v0.1.14
Downloaded libc v0.2.68
Downloaded num_cpus v1.12.0
Downloaded pin-project-lite v0.1.4
Downloaded async-task v1.3.1
Downloaded futures-io v0.3.4
Downloaded futures-core v0.3.4
Downloaded crossbeam-deque v0.7.3
Downloaded rand_chacha v0.2.2
Downloaded crossbeam-utils v0.7.2
Downloaded memchr v2.3.3
Downloaded kv-log-macro v1.0.4
Downloaded futures-timer v2.0.2
Downloaded once_cell v1.3.1
Downloaded crossbeam-channel v0.4.2
Downloaded broadcaster v1.0.0
Downloaded rustc-serialize v0.3.24
Downloaded crossbeam-epoch v0.8.2
Downloaded futures-util v0.3.4
Downloaded gcc v0.3.55
Downloaded futures-channel v0.3.4
Downloaded autocfg v1.0.0
Downloaded parking_lot v0.10.0
Downloaded futures-sink v0.3.4
Downloaded futures-macro v0.3.4
Downloaded scopeguard v1.1.0
Downloaded proc-macro-hack v0.5.14
Downloaded proc-macro-nested v0.1.4
Downloaded memoffset v0.5.4
Downloaded futures-task v0.3.4
Downloaded proc-macro2 v1.0.9
Downloaded syn v1.0.17
Downloaded parking_lot_core v0.7.0
Downloaded lock_api v0.3.3
Downloaded quote v1.0.3
Downloaded smallvec v1.2.0
Compiling libc v0.2.68
Compiling cfg-if v0.1.10
Compiling autocfg v1.0.0
Compiling proc-macro2 v1.0.9
Compiling unicode-xid v0.2.0
Compiling maybe-uninit v2.0.0
Compiling scopeguard v1.1.0
Compiling syn v1.0.17
Compiling log v0.4.8
Compiling proc-macro-nested v0.1.4
Compiling getrandom v0.1.14
Compiling lazy_static v1.4.0
Compiling slab v0.4.2
Compiling futures-sink v0.3.4
Compiling smallvec v1.2.0
Compiling pin-utils v0.1.0-alpha.4
Compiling proc-macro-hack v0.5.14
Compiling futures-core v0.3.4
Compiling gcc v0.3.55
Compiling futures-task v0.3.4
Compiling memchr v2.3.3
Compiling ppv-lite86 v0.2.6
Compiling once_cell v1.3.1
Compiling futures-core-preview v0.3.0-alpha.19
Compiling futures-io v0.3.4
Compiling futures-timer v2.0.2
Compiling pin-project-lite v0.1.4
Compiling rustc-serialize v0.3.24
Compiling unicode-width v0.1.7
Compiling crossbeam-utils v0.7.2
Compiling memoffset v0.5.4
Compiling crossbeam-epoch v0.8.2
Compiling lock_api v0.3.3
Compiling futures-channel v0.3.4
Compiling futures-timer v1.0.3
Compiling rust-crypto v0.2.36
Compiling getopts v0.2.21
error[E0658]: cfg(doctest) is experimental and subject to change
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/memoffset-0.5.4/src/lib.rs:72:7
|
72 | #[cfg(doctest)]
| ^^^^^^^
|
= note: for more information, see rust-lang/rust#62210
= help: add #![feature(cfg_doctest)] to the crate attributes to enable

error[E0658]: cfg(doctest) is experimental and subject to change
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/memoffset-0.5.4/src/lib.rs:75:7
|
75 | #[cfg(doctest)]
| ^^^^^^^
|
= note: for more information, see rust-lang/rust#62210
= help: add #![feature(cfg_doctest)] to the crate attributes to enable

error: aborting due to 2 previous errors

For more information about this error, try rustc --explain E0658.
error: could not compile memoffset.
warning: build failed, waiting for other jobs to finish...
error: build failed
[root@bwg-vps bit-tunnel-by-bit-ranger]#

怎么解决?

@bit-ranger
Copy link
Owner

rust版本过低?我的版本是:
ubuntu 18.04.3 LTS
rustc 1.42.0

@luckypoem
Copy link
Author

嗯,我vps上的rust版本有点低,为1.40. 运行rustup update ,升级为最新版,然后运行cargo build --release就ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants