< 返回版块

C-Jeril 发表于 2024-01-22 11:57

每次cargo run都报错exit code: 3,但是多次强行启动后又有一次可以启动成功,有时候又会一次成功。不确定具体问题在哪儿。

PS D:\backend> cargo build `
   Compiling proc-macro2 v1.0.78
   Compiling unicode-ident v1.0.12
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling windows_x86_64_msvc v0.48.5
   Compiling smallvec v1.13.1
   Compiling bytes v1.5.0
   Compiling memchr v2.7.1
   Compiling pin-project-lite v0.2.13
   Compiling version_check v0.9.4
   Compiling parking_lot_core v0.9.9
   Compiling scopeguard v1.2.0
   Compiling log v0.4.20
   Compiling lock_api v0.4.11
   Compiling itoa v1.0.10
   Compiling futures-core v0.3.30
   Compiling slab v0.4.9
   Compiling once_cell v1.19.0
   Compiling windows-targets v0.48.5
   Compiling windows-sys v0.48.0
   Compiling futures-sink v0.3.30
   Compiling pin-utils v0.1.0
   Compiling futures-channel v0.3.30
   Compiling futures-io v0.3.30
   Compiling quote v1.0.35
   Compiling parking_lot v0.12.1
   Compiling num_cpus v1.16.0
   Compiling syn v2.0.48
   Compiling jobserver v0.1.27
   Compiling futures-task v0.3.30
   Compiling tracing-core v0.1.32
   Compiling num-traits v0.2.17
   Compiling cc v1.0.83
   Compiling getrandom v0.2.12
   Compiling fnv v1.0.7
   Compiling serde v1.0.195
   Compiling equivalent v1.0.1
   Compiling typenum v1.17.0
   Compiling hashbrown v0.14.3
   Compiling generic-array v0.14.7
   Compiling rustversion v1.0.14
   Compiling tinyvec_macros v0.1.1
   Compiling tinyvec v1.6.0
   Compiling indexmap v2.1.0
   Compiling percent-encoding v2.3.1
   Compiling byteorder v1.5.0
   Compiling unicode-normalization v0.1.22
   Compiling rand_core v0.6.4
   Compiling winapi v0.3.9
   Compiling unicode-bidi v0.3.15
   Compiling ppv-lite86 v0.2.17
   Compiling subtle v2.5.0
   Compiling windows_x86_64_msvc v0.52.0
   Compiling rand_chacha v0.3.1
   Compiling async-trait v0.1.77
   Compiling block-buffer v0.10.4
   Compiling rand v0.8.5
   Compiling crypto-common v0.1.6
   Compiling tower-service v0.3.2
   Compiling httparse v1.8.0
   Compiling base64 v0.21.7
   Compiling digest v0.10.7
   Compiling httpdate v1.0.3
   Compiling serde_json v1.0.111
   Compiling ryu v1.0.16
   Compiling untrusted v0.9.0
   Compiling regex-syntax v0.8.2
   Compiling windows-targets v0.52.0
   Compiling mime v0.3.17
   Compiling ring v0.17.7
   Compiling windows-sys v0.52.0
   Compiling form_urlencoded v1.2.1
   Compiling socket2 v0.5.5
   Compiling mio v0.8.10
   Compiling http v1.0.0
   Compiling http v0.2.11
   Compiling num-integer v0.1.45
   Compiling cpufeatures v0.2.12
   Compiling sha2 v0.10.8
   Compiling hmac v0.12.1
   Compiling ring v0.16.20
   Compiling aho-corasick v1.1.2
   Compiling indexmap v1.9.3
   Compiling pkg-config v0.3.29
   Compiling syn v1.0.109
   Compiling lazy_static v1.4.0
   Compiling thiserror v1.0.56
   Compiling tower-layer v0.3.2
   Compiling spin v0.9.8
   Compiling regex-automata v0.4.4
   Compiling futures-macro v0.3.30
   Compiling tokio-macros v2.2.0
   Compiling tracing-attributes v0.1.27
   Compiling tokio v1.35.1
   Compiling futures-util v0.3.30
   Compiling serde_derive v1.0.195
   Compiling tracing v0.1.40
   Compiling zstd-sys v2.0.9+zstd.1.5.5
   Compiling zeroize_derive v1.4.2
   Compiling thiserror-impl v1.0.56
   Compiling pin-project-internal v1.1.3
   Compiling http-body v0.4.6
   Compiling http-body v1.0.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling num-bigint v0.3.3
   Compiling hashbrown v0.12.3
   Compiling finl_unicode v1.2.0
   Compiling native-tls v0.2.11
   Compiling tokio-util v0.7.10
   Compiling try-lock v0.2.5
   Compiling pin-project v1.1.3
   Compiling want v0.3.1
   Compiling h2 v0.3.24
   Compiling stringprep v0.1.4
   Compiling zeroize v1.7.0
   Compiling regex v1.10.3
   Compiling schannel v0.1.23
   Compiling md-5 v0.10.6
   Compiling hdrhistogram v7.5.4
   Compiling proc-macro-error v1.0.4
   Compiling unicase v2.7.0
   Compiling num-iter v0.1.43
   Compiling num-rational v0.3.2
   Compiling siphasher v0.3.11
   Compiling fallible-iterator v0.2.0
   Compiling spin v0.5.2
   Compiling untrusted v0.7.1
   Compiling phf_shared v0.11.2
   Compiling postgres-protocol v0.6.6
   Compiling tower v0.4.13
   Compiling chrono v0.4.31
   Compiling serde_urlencoded v0.7.1
   Compiling hyper v0.14.28
   Compiling idna v0.5.0
   Compiling alloc-no-stdlib v2.0.4
   Compiling vcpkg v0.2.15
   Compiling crc32fast v1.3.2
   Compiling zstd-safe v7.0.0
   Compiling sync_wrapper v0.1.2
   Compiling url v2.5.0
   Compiling pq-sys v0.4.8
   Compiling alloc-stdlib v0.2.2
   Compiling tokio-native-tls v0.3.1
   Compiling serde_path_to_error v0.1.15
   Compiling postgres-types v0.2.6
   Compiling validator_types v0.15.0
   Compiling phf v0.11.2
   Compiling h2 v0.4.2
   Compiling http-body-util v0.1.0
   Compiling axum-core v0.4.3
   Compiling axum-core v0.3.4
   Compiling num-complex v0.3.1
   Compiling scheduled-thread-pool v0.2.7
   Compiling crossbeam-utils v0.8.19
   Compiling rustls v0.20.9
   Compiling regex-syntax v0.6.29
   Compiling protobuf v2.28.0
   Compiling rustls-pki-types v1.1.0
   Compiling whoami v1.4.1
   Compiling const-oid v0.9.6
   Compiling matchit v0.7.3
   Compiling if_chain v1.0.2
   Compiling matches v0.1.10
   Compiling adler v1.0.2
   Compiling rustls v0.22.2
   Compiling idna v0.2.3
   Compiling miniz_oxide v0.7.1
   Compiling hyper-tls v0.5.0
   Compiling der v0.7.8
   Compiling tokio-postgres v0.7.10
   Compiling rustls-webpki v0.102.1
   Compiling num v0.3.1
   Compiling regex-automata v0.1.10
   Compiling r2d2 v0.8.10
   Compiling mime_guess v2.0.4
   Compiling brotli-decompressor v2.5.1
   Compiling hyper v1.1.0
   Compiling futures-executor v0.3.30
   Compiling winreg v0.50.0
   Compiling diesel_table_macro_syntax v0.1.0
   Compiling validator_derive v0.15.0
   Compiling axum v0.6.20
   Compiling axum v0.7.4
   Compiling encoding_rs v0.8.33
   Compiling prometheus v0.13.3
   Compiling overload v0.1.1
   Compiling anyhow v1.0.79
   Compiling base64 v0.13.1
   Compiling data-encoding v2.5.0
   Compiling bitflags v2.4.2
   Compiling ipnet v2.9.0
   Compiling powerfmt v0.2.0
   Compiling deranged v0.3.11
   Compiling biscuit v0.5.0
   Compiling validator v0.15.0
   Compiling reqwest v0.11.23
   Compiling nu-ansi-term v0.46.0
   Compiling hyper-util v0.1.2
   Compiling brotli v3.4.0
   Compiling diesel_derives v2.1.2
   Compiling futures v0.3.30
   Compiling flate2 v1.0.28
   Compiling matchers v0.1.0
   Compiling spki v0.7.3
   Compiling sharded-slab v0.1.7
   Compiling winapi-util v0.1.6
   Compiling pem v3.0.3
   Compiling tracing-log v0.2.0
   Compiling thread_local v1.1.7
   Compiling bcder v0.7.4
   Compiling bitflags v1.3.2
   Compiling time-core v0.1.2
   Compiling signature v2.2.0
   Compiling hex v0.4.3
   Compiling time v0.3.31
   Compiling tracing-subscriber v0.3.18
   Compiling tokio-rustls v0.25.0
   Compiling termcolor v1.4.1
   Compiling diesel v2.1.4
   Compiling crossbeam-channel v0.5.11
   Compiling openid v0.11.1
   Compiling jwt v0.16.0
   Compiling postgres v0.19.7
   Compiling tokio-stream v0.1.14
   Compiling is-terminal v0.4.10
   Compiling uuid v1.7.0
   Compiling scoped-futures v0.1.3
   Compiling iri-string v0.7.0
   Compiling http-range-header v0.4.0
   Compiling humantime v2.1.0
   Compiling r2d2_postgres v0.18.1
   Compiling env_logger v0.10.2
   Compiling tracing-appender v0.2.3
   Compiling server v0.1.0
   Compiling dotenv v0.15.0
   Compiling axum-extra v0.9.2
   Compiling zstd v0.13.0
   Compiling async-compression v0.4.6
   Compiling tower-http v0.5.1
   Compiling webpki v0.22.4
   Compiling sct v0.7.1
   Compiling x509-certificate v0.23.1
   Compiling tokio-postgres-rustls v0.11.1
   Compiling tokio-rustls v0.23.4
   Compiling diesel-async v0.4.1
   Compiling backend v0.1.5 (D:\jsc hi\backend)

    Finished dev [unoptimized + debuginfo] target(s) in 0.27s `
     Running `target\debug\backend.exe`
error: process didn't exit successfully: `target\debug\backend.exe` (exit code: 1) `

PS D:\backend> cargo run `
    Finished dev [unoptimized + debuginfo] target(s) in 0.25s `
     Running `target\debug\backend.exe`
error: process didn't exit successfully: `target\debug\backend.exe` (exit code: 3) `

评论区

写评论
作者 C-Jeril 2024-01-22 14:58

有道理,我试试

--
👇
asuper:

  1. 问题问的是cargo run,贴的log好像是build也会报错,是不是贴错了?
  2. 在main()第一行加个print!()看看是否能启动
  3. 一般rust推荐使用短划线 - 做目录名的分隔,建议不要用空格
asuper 2024-01-22 14:03
  1. 问题问的是cargo run,贴的log好像是build也会报错,是不是贴错了?
  2. 在main()第一行加个print!()看看是否能启动
  3. 一般rust推荐使用短划线 - 做目录名的分隔,建议不要用空格
1 共 2 条评论, 1 页