使用 heroku-buildpack-rust 构建 Rocket 应用程序时出现链接错误
Linking error when using heroku-buildpack-rust to build Rocket app
我使用 Rocket、Diesel 和 SQLite 构建了一个 API。它在本地运行良好。
现在我想将我的 API 部署到 Heroku。我要离开这个例子:https://github.com/emk/rust-buildpack-example-rocket
我已尽可能按照随附的说明进行操作。但是,构建步骤returns出现如下错误:
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.0.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.1.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.10.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.11.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.12.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.13.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.14.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.15.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.2.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.3.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.4.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.5.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.6.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.7.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.8.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.9.rcgu.o" "-o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.xdi22qyw1jm4dgn.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/codon/tmp/cache/target/release/deps" "-L" "/tmp/codon/tmp/cache/target/release/build/ring-0f13c32780184988/out" "-L" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/codon/tmp/cache/target/release/deps/libuuid-ce4969afc97ad8b9.rlib" "/tmp/codon/tmp/cache/target/release/deps/libjsonwebtoken-44a266ecba46fbf1.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpem-d45dd6ee3de1c97b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libregex-c1e1617462b9257c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libthread_local-3948ce50dadeb546.rlib" "/tmp/codon/tmp/cache/target/release/deps/libregex_syntax-54ff6446d5044f96.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaho_corasick-c99fa63c4b172ad4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsimple_asn1-4334711a5a537225.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_bigint-109e809cd264f00a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libchrono-3405124ec15564a1.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_integer-137bdd49e20d58ff.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_traits-2d6f0e657d8b410e.rlib" "/tmp/codon/tmp/cache/target/release/deps/libring-fea6120cdf068f14.rlib" "/tmp/codon/tmp/cache/target/release/deps/libspin-8b88071a74fd1146.rlib" "/tmp/codon/tmp/cache/target/release/deps/libuntrusted-07c812cecbdda234.rlib" "/tmp/codon/tmp/cache/target/release/deps/libreqwest-b54031f22b1a4160.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhyper_tls-b12b7cccc6f3158b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libipnet-5dd6b6b4ddc5ef77.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtokio_tls-50f6bfe1206058f6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libserde_urlencoded-b45320924fa23eeb.rlib" "/tmp/codon/tmp/cache/target/release/deps/libencoding_rs-9c06080874b247fd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbase64-a69b0bd0ffc84f09.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmime_guess-90ce58d79a8765e7.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicase-420baa79e66eb7be.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmime-0c405423f2f6d82d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnative_tls-cb230d67fabb8e5d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopenssl_probe-9ce2191185e4de74.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopenssl-f4e1d41159b2a15c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopenssl_sys-d761d87b2bc00b93.rlib" "/tmp/codon/tmp/cache/target/release/deps/libforeign_types-289696442456e97a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libforeign_types_shared-81fde169aac187d8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbitflags-ad0a1f0454a30088.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhyper-7e6648b4650fe710.rlib" "/tmp/codon/tmp/cache/target/release/deps/libwant-852cffc58ffe3e6c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtry_lock-0d0e456c3c6f815b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libh2-c84ec7b5ed846947.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtracing_futures-79d6686b1765ad62.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project-aca85cf2e90e6668.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtokio_util-31d259494e95e968.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_sink-37e79a2d3fc2a2f5.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttpdate-ec985aa61aaac5ed.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsocket2-f092214f6231a7aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtower_service-a31ecf311ec0a4e7.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_channel-45ffa01c0944bd39.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtracing-cf742b6b1580f84f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtracing_core-4b501e5d197e1da0.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtokio-5267c2e05320b616.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmio-cfe69088ae62c7d6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libiovec-9d674a86d4abd964.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnet2-f13f190e6b162b14.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project_lite-ed875ae37bdc6cb3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project_lite-72a128b5049f8c7c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttp_body-2f3775be87dfaef4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_util-1de6efb75e7fe6b4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_io-53fa8ca8b9791d4d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libslab-314cf7e98398e4c0.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project-486c6ceef64cfb50.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_task-ecf44cca64d39c5f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libonce_cell-bc62e82218494945.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_utils-8ea4b6a999ca85d6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_core-ef7d112a948d9544.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblazy_static-72fd4c50b9d3882e.rlib" "/tmp/codon/tmp/cache/target/release/deps/liburl-bdb51ad60a81f567.rlib" "/tmp/codon/tmp/cache/target/release/deps/libidna-2cff8351c96b71bb.rlib" "/tmp/codon/tmp/cache/target/release/deps/libform_urlencoded-6c027baec4c4b4b3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttp-5600fc8dad0affc6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbytes-9bbef4070681ce0a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfnv-b63504f5018cc108.rlib" "/tmp/codon/tmp/cache/target/release/deps/librocket_contrib-cba39fdd66586fdc.rlib" "/tmp/codon/tmp/cache/target/release/deps/libserde_json-7e7f02c69d41a7c1.rlib" "/tmp/codon/tmp/cache/target/release/deps/libryu-b04ad59bf2ec6b7b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libitoa-553452e4c159d751.rlib" "/tmp/codon/tmp/cache/target/release/deps/librocket-6517ef464b93fe21.rlib" "/tmp/codon/tmp/cache/target/release/deps/libatty-8e61528b57500acf.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmemchr-6c817d998b0df8da.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtoml-466f4ac1f73ff753.rlib" "/tmp/codon/tmp/cache/target/release/deps/libserde-1883d0398c1c65c4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libyansi-0b1185001ec1bea1.rlib" "/tmp/codon/tmp/cache/target/release/deps/librocket_http-139bf580f4665612.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhyper-d7f34df2825d890d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmime-d0060301e3786d04.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblog-da4ae0efbcc6b0c2.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblanguage_tags-76e6eed428a583a8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtypeable-e833b24097d2df79.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtraitobject-9347322b3a1d51bf.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_cpus-1d370d01f26ec5c2.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttparse-6f0db3eff7258637.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicase-2a7911adf2b9d806.rlib" "/tmp/codon/tmp/cache/target/release/deps/liburl-b126357f4d0d4ecf.rlib" "/tmp/codon/tmp/cache/target/release/deps/libidna-ee1ff6ebcefa9e2b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicode_normalization-815d148452844814.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtinyvec-295d5ad3fc0cbc9c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtinyvec_macros-7830452eb45edc19.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicode_bidi-41abae14da234d1b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmatches-32581ec9f6412ebd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbase64-e81130a5f1619be7.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsafemem-dff7afbb6aa66a1b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicode_xid-caeae2de0f8b5463.rlib" "/tmp/codon/tmp/cache/target/release/deps/libstate-a5c8be246304bd29.rlib" "/tmp/codon/tmp/cache/target/release/deps/libindexmap-1e55b735637bcc6a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhashbrown-c723dee100e54a5e.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcookie-4b124e3056be9a1b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhkdf-2560e81ed4cbcd59.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhmac-9d85fffb0d093356.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcrypto_mac-cf605242fc7734e3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsubtle-44a12f187f6d2fc6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsha2-a965625e9b4b1d77.rlib" "/tmp/codon/tmp/cache/target/release/deps/libdigest-30da3c50b4689178.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfake_simd-3756b16c63a82254.rlib" "/tmp/codon/tmp/cache/target/release/deps/libblock_buffer-ec72f459c0678688.rlib" "/tmp/codon/tmp/cache/target/release/deps/libblock_padding-2ed51b72affadbdd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbyte_tools-212432e5188e0eb9.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaes_gcm-c5efb1474636768e.rlib" "/tmp/codon/tmp/cache/target/release/deps/libzeroize-2d4cd4499b23fe5d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libghash-ede53737e70539aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpolyval-141b670c6170d563.rlib" "/tmp/codon/tmp/cache/target/release/deps/libuniversal_hash-10f59e96e255cff0.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsubtle-f4e27560cc2cc6cc.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaes-970b959d7ddcb22f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaes_soft-f4d5f375503c69d8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopaque_debug-b3511308285898cb.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaead-f00469a5862cc6db.rlib" "/tmp/codon/tmp/cache/target/release/deps/libblock_cipher_trait-38b510971dd0cef9.rlib" "/tmp/codon/tmp/cache/target/release/deps/libgeneric_array-8c74a886c0bfa1b8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtypenum-8754dce572e25207.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbase64-7ad18e9add804d1e.rlib" "/tmp/codon/tmp/cache/target/release/deps/librand-5028676d61a551aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/librand_chacha-61ee5a941a395a97.rlib" "/tmp/codon/tmp/cache/target/release/deps/libppv_lite86-a6feee9ed6f337c0.rlib" "/tmp/codon/tmp/cache/target/release/deps/librand_core-405e37eb109d2505.rlib" "/tmp/codon/tmp/cache/target/release/deps/libgetrandom-e61e52431766a293.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtime-f621877706c13ab8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpercent_encoding-a93af9c56752979f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpercent_encoding-027fc70817b8b184.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpear-c1de2330d615ed19.rlib" "/tmp/codon/tmp/cache/target/release/deps/libdiesel-36fcc1d4d85c33cb.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblibsqlite3_sys-947f19b33c42a82f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libr2d2-9e686ca6dd2cfb64.rlib" "/tmp/codon/tmp/cache/target/release/deps/libscheduled_thread_pool-660da798946ab8fd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libparking_lot-890602ac3a7f5c68.rlib" "/tmp/codon/tmp/cache/target/release/deps/libparking_lot_core-216fb31250c05844.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblibc-5f2395bf90310631.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsmallvec-fe9b70472fb1b09d.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblock_api-46f35b0cc374c311.rlib" "/tmp/codon/tmp/cache/target/release/deps/libscopeguard-680be5d68e26570b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libinstant-1d59ba381bc156aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcfg_if-cb3a90c6c918d108.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblog-fe5eb1ec3d35d5a3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcfg_if-e0361196973a0e81.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbyteorder-696e60eb23609a9a.rlib" "-Wl,--start-group" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-25c6acf8063a3802.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-539f13c9442f1597.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-37db28e905edb56b.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-9ef2480568df55af.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1e0f0992cdbecd66.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-6c8e02b8fedc1e5f.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-807e5ad203594490.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-083fce1bea11612a.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-1af568081add9042.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-1395b54a3b3f45bf.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-caba820045f178d5.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-512eb53291f6de7e.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-5efacc5025f9f3d8.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-9c4002b5f79ba0e1.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-90996f4879673567.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9ea09a899c3eda46.rlib" "-Wl,--end-group" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ef2408da76957905.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-lsqlite3" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
= note: /usr/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
error: aborting due to previous error; 9 warnings emitted
error: could not compile `cardbox_api`
To learn more, run the command again with --verbose.
! Push rejected, failed to compile Rust app.
! Push failed
编译器好像找不到lsqlite3
?如何指定位置?我怎么才能找到 lsqlite3
的安装位置?
我对云部署和 Heroku 还很陌生,所以我有点不知道接下来要尝试什么。
由于错误消息表明您的构建系统缺失 libsqlite3
。
有两种方法可以解决这个问题:
将 libsqlite3-sys = { version = "0.18", features = ["bundled"]}
添加到您的 Cargo.toml
。这指示货物也构建 libsqlite3
作为应用程序构建的一部分。使用此方法静态链接库。
在构建系统上安装 libsqlite3
并 use the SQLITE3_LIB_DIR
environment variable 将编译器指向正确的目录。 libsqlite3
将动态链接,这意味着您还需要在系统上提供此库 运行 您之后的应用程序。
我使用 Rocket、Diesel 和 SQLite 构建了一个 API。它在本地运行良好。
现在我想将我的 API 部署到 Heroku。我要离开这个例子:https://github.com/emk/rust-buildpack-example-rocket
我已尽可能按照随附的说明进行操作。但是,构建步骤returns出现如下错误:
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.0.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.1.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.10.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.11.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.12.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.13.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.14.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.15.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.2.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.3.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.4.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.5.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.6.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.7.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.8.rcgu.o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.cardbox_api.2391d6uc-cgu.9.rcgu.o" "-o" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47" "/tmp/codon/tmp/cache/target/release/deps/cardbox_api-1b33053639456c47.xdi22qyw1jm4dgn.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/codon/tmp/cache/target/release/deps" "-L" "/tmp/codon/tmp/cache/target/release/build/ring-0f13c32780184988/out" "-L" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/codon/tmp/cache/target/release/deps/libuuid-ce4969afc97ad8b9.rlib" "/tmp/codon/tmp/cache/target/release/deps/libjsonwebtoken-44a266ecba46fbf1.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpem-d45dd6ee3de1c97b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libregex-c1e1617462b9257c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libthread_local-3948ce50dadeb546.rlib" "/tmp/codon/tmp/cache/target/release/deps/libregex_syntax-54ff6446d5044f96.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaho_corasick-c99fa63c4b172ad4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsimple_asn1-4334711a5a537225.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_bigint-109e809cd264f00a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libchrono-3405124ec15564a1.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_integer-137bdd49e20d58ff.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_traits-2d6f0e657d8b410e.rlib" "/tmp/codon/tmp/cache/target/release/deps/libring-fea6120cdf068f14.rlib" "/tmp/codon/tmp/cache/target/release/deps/libspin-8b88071a74fd1146.rlib" "/tmp/codon/tmp/cache/target/release/deps/libuntrusted-07c812cecbdda234.rlib" "/tmp/codon/tmp/cache/target/release/deps/libreqwest-b54031f22b1a4160.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhyper_tls-b12b7cccc6f3158b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libipnet-5dd6b6b4ddc5ef77.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtokio_tls-50f6bfe1206058f6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libserde_urlencoded-b45320924fa23eeb.rlib" "/tmp/codon/tmp/cache/target/release/deps/libencoding_rs-9c06080874b247fd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbase64-a69b0bd0ffc84f09.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmime_guess-90ce58d79a8765e7.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicase-420baa79e66eb7be.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmime-0c405423f2f6d82d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnative_tls-cb230d67fabb8e5d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopenssl_probe-9ce2191185e4de74.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopenssl-f4e1d41159b2a15c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopenssl_sys-d761d87b2bc00b93.rlib" "/tmp/codon/tmp/cache/target/release/deps/libforeign_types-289696442456e97a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libforeign_types_shared-81fde169aac187d8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbitflags-ad0a1f0454a30088.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhyper-7e6648b4650fe710.rlib" "/tmp/codon/tmp/cache/target/release/deps/libwant-852cffc58ffe3e6c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtry_lock-0d0e456c3c6f815b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libh2-c84ec7b5ed846947.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtracing_futures-79d6686b1765ad62.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project-aca85cf2e90e6668.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtokio_util-31d259494e95e968.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_sink-37e79a2d3fc2a2f5.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttpdate-ec985aa61aaac5ed.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsocket2-f092214f6231a7aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtower_service-a31ecf311ec0a4e7.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_channel-45ffa01c0944bd39.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtracing-cf742b6b1580f84f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtracing_core-4b501e5d197e1da0.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtokio-5267c2e05320b616.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmio-cfe69088ae62c7d6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libiovec-9d674a86d4abd964.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnet2-f13f190e6b162b14.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project_lite-ed875ae37bdc6cb3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project_lite-72a128b5049f8c7c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttp_body-2f3775be87dfaef4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_util-1de6efb75e7fe6b4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_io-53fa8ca8b9791d4d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libslab-314cf7e98398e4c0.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_project-486c6ceef64cfb50.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_task-ecf44cca64d39c5f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libonce_cell-bc62e82218494945.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpin_utils-8ea4b6a999ca85d6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfutures_core-ef7d112a948d9544.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblazy_static-72fd4c50b9d3882e.rlib" "/tmp/codon/tmp/cache/target/release/deps/liburl-bdb51ad60a81f567.rlib" "/tmp/codon/tmp/cache/target/release/deps/libidna-2cff8351c96b71bb.rlib" "/tmp/codon/tmp/cache/target/release/deps/libform_urlencoded-6c027baec4c4b4b3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttp-5600fc8dad0affc6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbytes-9bbef4070681ce0a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfnv-b63504f5018cc108.rlib" "/tmp/codon/tmp/cache/target/release/deps/librocket_contrib-cba39fdd66586fdc.rlib" "/tmp/codon/tmp/cache/target/release/deps/libserde_json-7e7f02c69d41a7c1.rlib" "/tmp/codon/tmp/cache/target/release/deps/libryu-b04ad59bf2ec6b7b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libitoa-553452e4c159d751.rlib" "/tmp/codon/tmp/cache/target/release/deps/librocket-6517ef464b93fe21.rlib" "/tmp/codon/tmp/cache/target/release/deps/libatty-8e61528b57500acf.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmemchr-6c817d998b0df8da.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtoml-466f4ac1f73ff753.rlib" "/tmp/codon/tmp/cache/target/release/deps/libserde-1883d0398c1c65c4.rlib" "/tmp/codon/tmp/cache/target/release/deps/libyansi-0b1185001ec1bea1.rlib" "/tmp/codon/tmp/cache/target/release/deps/librocket_http-139bf580f4665612.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhyper-d7f34df2825d890d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmime-d0060301e3786d04.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblog-da4ae0efbcc6b0c2.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblanguage_tags-76e6eed428a583a8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtypeable-e833b24097d2df79.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtraitobject-9347322b3a1d51bf.rlib" "/tmp/codon/tmp/cache/target/release/deps/libnum_cpus-1d370d01f26ec5c2.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhttparse-6f0db3eff7258637.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicase-2a7911adf2b9d806.rlib" "/tmp/codon/tmp/cache/target/release/deps/liburl-b126357f4d0d4ecf.rlib" "/tmp/codon/tmp/cache/target/release/deps/libidna-ee1ff6ebcefa9e2b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicode_normalization-815d148452844814.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtinyvec-295d5ad3fc0cbc9c.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtinyvec_macros-7830452eb45edc19.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicode_bidi-41abae14da234d1b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libmatches-32581ec9f6412ebd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbase64-e81130a5f1619be7.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsafemem-dff7afbb6aa66a1b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libunicode_xid-caeae2de0f8b5463.rlib" "/tmp/codon/tmp/cache/target/release/deps/libstate-a5c8be246304bd29.rlib" "/tmp/codon/tmp/cache/target/release/deps/libindexmap-1e55b735637bcc6a.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhashbrown-c723dee100e54a5e.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcookie-4b124e3056be9a1b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhkdf-2560e81ed4cbcd59.rlib" "/tmp/codon/tmp/cache/target/release/deps/libhmac-9d85fffb0d093356.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcrypto_mac-cf605242fc7734e3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsubtle-44a12f187f6d2fc6.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsha2-a965625e9b4b1d77.rlib" "/tmp/codon/tmp/cache/target/release/deps/libdigest-30da3c50b4689178.rlib" "/tmp/codon/tmp/cache/target/release/deps/libfake_simd-3756b16c63a82254.rlib" "/tmp/codon/tmp/cache/target/release/deps/libblock_buffer-ec72f459c0678688.rlib" "/tmp/codon/tmp/cache/target/release/deps/libblock_padding-2ed51b72affadbdd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbyte_tools-212432e5188e0eb9.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaes_gcm-c5efb1474636768e.rlib" "/tmp/codon/tmp/cache/target/release/deps/libzeroize-2d4cd4499b23fe5d.rlib" "/tmp/codon/tmp/cache/target/release/deps/libghash-ede53737e70539aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpolyval-141b670c6170d563.rlib" "/tmp/codon/tmp/cache/target/release/deps/libuniversal_hash-10f59e96e255cff0.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsubtle-f4e27560cc2cc6cc.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaes-970b959d7ddcb22f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaes_soft-f4d5f375503c69d8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libopaque_debug-b3511308285898cb.rlib" "/tmp/codon/tmp/cache/target/release/deps/libaead-f00469a5862cc6db.rlib" "/tmp/codon/tmp/cache/target/release/deps/libblock_cipher_trait-38b510971dd0cef9.rlib" "/tmp/codon/tmp/cache/target/release/deps/libgeneric_array-8c74a886c0bfa1b8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtypenum-8754dce572e25207.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbase64-7ad18e9add804d1e.rlib" "/tmp/codon/tmp/cache/target/release/deps/librand-5028676d61a551aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/librand_chacha-61ee5a941a395a97.rlib" "/tmp/codon/tmp/cache/target/release/deps/libppv_lite86-a6feee9ed6f337c0.rlib" "/tmp/codon/tmp/cache/target/release/deps/librand_core-405e37eb109d2505.rlib" "/tmp/codon/tmp/cache/target/release/deps/libgetrandom-e61e52431766a293.rlib" "/tmp/codon/tmp/cache/target/release/deps/libtime-f621877706c13ab8.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpercent_encoding-a93af9c56752979f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpercent_encoding-027fc70817b8b184.rlib" "/tmp/codon/tmp/cache/target/release/deps/libpear-c1de2330d615ed19.rlib" "/tmp/codon/tmp/cache/target/release/deps/libdiesel-36fcc1d4d85c33cb.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblibsqlite3_sys-947f19b33c42a82f.rlib" "/tmp/codon/tmp/cache/target/release/deps/libr2d2-9e686ca6dd2cfb64.rlib" "/tmp/codon/tmp/cache/target/release/deps/libscheduled_thread_pool-660da798946ab8fd.rlib" "/tmp/codon/tmp/cache/target/release/deps/libparking_lot-890602ac3a7f5c68.rlib" "/tmp/codon/tmp/cache/target/release/deps/libparking_lot_core-216fb31250c05844.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblibc-5f2395bf90310631.rlib" "/tmp/codon/tmp/cache/target/release/deps/libsmallvec-fe9b70472fb1b09d.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblock_api-46f35b0cc374c311.rlib" "/tmp/codon/tmp/cache/target/release/deps/libscopeguard-680be5d68e26570b.rlib" "/tmp/codon/tmp/cache/target/release/deps/libinstant-1d59ba381bc156aa.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcfg_if-cb3a90c6c918d108.rlib" "/tmp/codon/tmp/cache/target/release/deps/liblog-fe5eb1ec3d35d5a3.rlib" "/tmp/codon/tmp/cache/target/release/deps/libcfg_if-e0361196973a0e81.rlib" "/tmp/codon/tmp/cache/target/release/deps/libbyteorder-696e60eb23609a9a.rlib" "-Wl,--start-group" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-25c6acf8063a3802.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-539f13c9442f1597.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-37db28e905edb56b.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-9ef2480568df55af.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-1e0f0992cdbecd66.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-6c8e02b8fedc1e5f.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-807e5ad203594490.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-083fce1bea11612a.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-1af568081add9042.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-1395b54a3b3f45bf.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-caba820045f178d5.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-512eb53291f6de7e.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-5efacc5025f9f3d8.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-9c4002b5f79ba0e1.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-90996f4879673567.rlib" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9ea09a899c3eda46.rlib" "-Wl,--end-group" "/tmp/codon/tmp/cache/multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ef2408da76957905.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-lsqlite3" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
= note: /usr/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
error: aborting due to previous error; 9 warnings emitted
error: could not compile `cardbox_api`
To learn more, run the command again with --verbose.
! Push rejected, failed to compile Rust app.
! Push failed
编译器好像找不到lsqlite3
?如何指定位置?我怎么才能找到 lsqlite3
的安装位置?
我对云部署和 Heroku 还很陌生,所以我有点不知道接下来要尝试什么。
由于错误消息表明您的构建系统缺失 libsqlite3
。
有两种方法可以解决这个问题:
将
libsqlite3-sys = { version = "0.18", features = ["bundled"]}
添加到您的Cargo.toml
。这指示货物也构建libsqlite3
作为应用程序构建的一部分。使用此方法静态链接库。在构建系统上安装
libsqlite3
并 use theSQLITE3_LIB_DIR
environment variable 将编译器指向正确的目录。libsqlite3
将动态链接,这意味着您还需要在系统上提供此库 运行 您之后的应用程序。