4

我正在关注柴油的入门指南。当我运行命令时:

$ cargo install diesel_cli --no-default-features --features postgres

我在控制台中收到以下错误代码:

error: linking with `link.exe` failed: exit code: 1181
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.0.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.1.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.10.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.11.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.12.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.13.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.14.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.15.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.2.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.3.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.4.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.5.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.6.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.7.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.8.rcgu.o" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.diesel.4pcin0zm-cgu.9.rcgu.o" "/OUT:C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.exe" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\diesel-87279b2b4b74ae82.2bqnk8wbiae8n3v4.rcgu.o" "/OPT:REF,ICF" "/DEBUG" "/NATVIS:C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps" "/LIBPATH:C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\liburl-b64f84303e939a3f.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libpercent_encoding-23fac7e093db0f71.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libidna-5944515c97602a6a.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libunicode_normalization-7a9d0823b3f11544.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libsmallvec-14d4053d84cd21b3.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libunicode_bidi-4008be4fc388326f.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libmatches-320bc884c21663fb.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libtoml-f85431370f7f385b.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libtempfile-767577fe85091a00.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libremove_dir_all-c488a5eae09b9ebb.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand-86e5afa33828c4a1.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand_xorshift-8622f27e1e9197cd.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand_pcg-8dbeda0c4f3b7d2b.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand_hc-e6102018254d879a.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand_chacha-dc84463836ed258a.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand_isaac-9188f30cdc5e15d8.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand_core-f07cb7b1b0b60fee.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand_os-a23315aa194e3b44.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand_jitter-85e3830323c53a43.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librand_core-853b99e69ab8db62.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libserde-0dd3b858bbefaf98.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libmigrations_internals-6301ed5c861b2190.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libdotenv-00c4c2b0f2c087f7.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libregex-668ce2794b29e860.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libutf8_ranges-88183c0ee1dcf4d7.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libregex_syntax-0be042da05d053db.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libucd_util-04bf0fab4a236a8d.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libthread_local-b643acffb6065cc8.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\liblazy_static-3b7ae74eb03e33d1.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libaho_corasick-044c0b72a757450f.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libmemchr-4ce9863493aff37b.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\liberror_chain-a321aee4aa5c5be3.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libbacktrace-b8cdfb0a0ffbcc44.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\librustc_demangle-1cb99dd12862d25f.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libcfg_if-57c0e3818a765d4f.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libdiesel-ef1ac8a682289af4.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libpq_sys-5ce560e23705af94.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libbyteorder-19c8e4d8048834d9.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libclap-36165c4345255a02.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libvec_map-6d0f0d01ffe2ad76.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libtextwrap-07de25c8f4e38a9d.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libunicode_width-64ba826635c87de4.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libstrsim-8b1806549b4cae5b.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libbitflags-6e93f175a0fbb26d.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libatty-328d5b3b2d6e35e1.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libchrono-c394c3953acfbc39.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libnum_integer-da1aff2c27bf5717.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libnum_traits-ea73256244b717c8.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libtime-04cc238e462a1c62.rlib" "C:\\Users\\Jordi\\AppData\\Local\\Temp\\cargo-installJZmLkX\\release\\deps\\libwinapi-45cc9c4241b74afd.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-355141c685117d44.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-e62c2b969cf89e92.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libbacktrace_sys-ef5b66f3d14e54b9.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-7ac4b867b11af3dc.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-cf8d5d8130e6b38b.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-fe5ef317ab783bf0.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-de85e762a19070b0.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-54075683d9af2f09.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-6c8bc4c414dd9168.rlib" "C:\\Users\\Jordi\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-c1c73ddc384ca756.rlib" "libpq.lib" "advapi32.lib" "credui.lib" "dbghelp.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "opengl32.lib" "secur32.lib" "setupapi.lib" "user32.lib" "winspool.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "msvcrt.lib"
  = note: LINK : fatal error LNK1181: cannot open input file 'libpq.lib'


error: aborting due to previous error

error: failed to compile `diesel_cli v1.4.0`, intermediate artifacts can be found at `C:\Users\Jordi\AppData\Local\Temp\cargo-installJZmLkX`

Caused by:
  Could not compile `diesel_cli`.

有人可以解决我的问题吗?

4

0 回答 0