0

我试着去做cargo install wasm-pack,但总是失败。这是输出:-

louise@louise-FMVA1000F:~$ cargo install wasm-pack
    Updating crates.io index
  Installing wasm-pack v0.10.1
   Compiling libc v0.2.101
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.29
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.76
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.130
   Compiling serde_derive v1.0.130
   Compiling cc v1.0.70
   Compiling pkg-config v0.3.19
   Compiling cfg-if v0.1.10
   Compiling semver-parser v0.7.0
   Compiling lazy_static v1.4.0
   Compiling version_check v0.9.3
   Compiling maybe-uninit v2.0.0
   Compiling futures v0.1.31
   Compiling log v0.4.14
   Compiling byteorder v1.4.3
   Compiling memchr v2.4.1
   Compiling rand_core v0.4.2
   Compiling scopeguard v1.1.0
   Compiling either v1.6.1
   Compiling autocfg v0.1.7
   Compiling tinyvec_macros v0.1.0
   Compiling slab v0.4.4
   Compiling fnv v1.0.7
   Compiling adler v1.0.2
   Compiling itoa v0.4.8
   Compiling matches v0.1.9
   Compiling unicode-bidi v0.3.6
   Compiling gimli v0.25.0
   Compiling rustc-demangle v0.1.21
   Compiling failure_derive v0.1.8
   Compiling ryu v1.0.5
   Compiling bitflags v1.3.2
   Compiling crc32fast v1.2.1
   Compiling unicode-width v0.1.8
   Compiling regex-syntax v0.6.25
   Compiling hashbrown v0.11.2
   Compiling foreign-types-shared v0.1.1
   Compiling httparse v1.5.1
   Compiling openssl-probe v0.1.4
   Compiling serde_json v1.0.67
   Compiling openssl v0.10.36
   Compiling percent-encoding v2.1.0
   Compiling percent-encoding v1.0.1
   Compiling once_cell v1.8.0
   Compiling try-lock v0.2.3
   Compiling native-tls v0.2.8
   Compiling parking_lot_core v0.8.5
   Compiling encoding_rs v0.8.28
   Compiling smallvec v1.6.1
   Compiling stable_deref_trait v1.2.0
   Compiling curl v0.4.38
   Compiling unicode-segmentation v1.8.0
   Compiling lazy_static v0.2.11
   Compiling mime v0.3.16
   Compiling vec_map v0.8.2
   Compiling dtoa v0.4.8
   Compiling strsim v0.8.0
   Compiling quick-error v1.2.3
   Compiling scopeguard v0.3.3
   Compiling termcolor v1.1.2
   Compiling ansi_term v0.11.0
   Compiling same-file v1.0.6
   Compiling is_executable v0.1.2
   Compiling siphasher v0.2.3
   Compiling hex v0.3.2
   Compiling glob v0.2.11
   Compiling crossbeam-utils v0.7.2
   Compiling miniz_oxide v0.4.4
   Compiling memoffset v0.5.6
   Compiling crossbeam-epoch v0.8.2
   Compiling indexmap v1.7.0
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling instant v0.1.10
   Compiling openssl-src v111.16.0+1.1.1l
   Compiling try_from v0.3.2
   Compiling backtrace v0.3.61
   Compiling libz-sys v1.1.3
   Compiling bzip2-sys v0.1.11+1.0.8
   Compiling curl-sys v0.4.45+curl-7.78.0
   Compiling unicase v2.6.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling base64 v0.10.1
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.4
   Compiling lock_api v0.3.4
   Compiling lock_api v0.4.5
   Compiling rand_chacha v0.1.1
   Compiling rand_pcg v0.1.2
   Compiling rand v0.6.5
   Compiling tinyvec v1.3.1
   Compiling tokio-sync v0.1.8
   Compiling addr2line v0.16.0
   Compiling textwrap v0.11.0
   Compiling foreign-types v0.3.2
   Compiling form_urlencoded v1.0.1
   Compiling owning_ref v0.4.1
   Compiling heck v0.3.3
   Compiling humantime v1.3.0
   Compiling walkdir v2.3.2
   Compiling openssl-sys v0.9.66
   Compiling rand_xorshift v0.1.1
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
   Compiling unicode-normalization v0.1.19
   Compiling lock_api v0.1.5
   Compiling iovec v0.1.4
   Compiling num_cpus v1.13.0
   Compiling time v0.1.43
   Compiling net2 v0.2.37
   Compiling atty v0.2.14
   Compiling rand v0.4.6
   Compiling rand_os v0.1.3
   Compiling filetime v0.2.15
   Compiling getrandom v0.2.3
   Compiling xattr v0.2.2
   Compiling socket2 v0.4.1
   Compiling rand v0.5.6
   Compiling terminal_size v0.1.17
   Compiling clicolors-control v0.2.0
   Compiling dirs v1.0.5
   Compiling termios v0.3.3
   Compiling quote v1.0.9
   Compiling smallvec v0.6.14
   Compiling want v0.2.0
   Compiling object v0.26.2
error: failed to run custom build command for `openssl-sys v0.9.66`

Caused by:
  process didn't exit successfully: `/tmp/cargo-install9SFpn8/release/build/openssl-sys-a1ffcc9d5989c27b/build-script-main` (exit status: 101)
  --- stdout
  cargo:rustc-cfg=const_fn
  cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
  X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  CC_x86_64-unknown-linux-gnu = None
  CC_x86_64_unknown_linux_gnu = None
  HOST_CC = None
  CC = None
  CFLAGS_x86_64-unknown-linux-gnu = None
  CFLAGS_x86_64_unknown_linux_gnu = None
  HOST_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  running "perl" "./Configure" "--prefix=/tmp/cargo-install9SFpn8/release/build/openssl-sys-03092066a6d99e84/out/openssl-build/install" "no-dso" "no-shared" "no-ssl3" "no-unit-test" "no-comp" "no-zlib" "no-zlib-dynamic" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64"
  Configuring OpenSSL version 1.1.1l (0x101010cfL) for linux-x86_64
  Using os-specific seed configuration
  Creating configdata.pm
  Creating Makefile

  **********************************************************************
  ***                                                                ***
  ***   OpenSSL has been successfully configured                     ***
  ***                                                                ***
  ***   If you encounter a problem while building, please open an    ***
  ***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
  ***   and include the output from the following command:           ***
  ***                                                                ***
  ***       perl configdata.pm --dump                                ***
  ***                                                                ***
  ***   (If you are new to OpenSSL, you might want to consult the    ***
  ***   'Troubleshooting' section in the INSTALL file first)         ***
  ***                                                                ***
  **********************************************************************
  running "make" "depend"

  --- stderr
  thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/louise/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.16.0+1.1.1l/src/lib.rs:477:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `wasm-pack v0.10.1`, intermediate artifacts can be found at `/tmp/cargo-install9SFpn8`

Caused by:
  build failed

我什至尝试安装pkg-configlibssl-dev设置$OPENSSL_DIR为,/usr/local/ssl但我仍然遇到这个问题。

4

0 回答 0