Hi! I'm following the getting started guide on the official website. I use:
I have postgre and sqlite installed via apt-get, but that didn't help.
I'm getting the following error after running cargo install diesel_cli:
...
Compiling dotenv v0.8.0
Compiling diesel_infer_schema v0.1.0
Compiling diesel_cli v0.10.1
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/diesel-1f52b7d1ec799a52.0.o" "-o" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/diesel-1f52b7d1ec799a52" "-Wl,--gc-sections" "-pie" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/cargo-install.CeErnkJsnvoy/release/deps" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/usr/lib" "-L" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libchrono-fa97c5438f4f5d73.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libnum-5196260a17d9d54c.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libnum_iter-2a175c94c0e0f047.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libdiesel_infer_schema-3f33f5ca71f1ad25.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libdiesel-42eced472f2d0973.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/liblibsqlite3_sys-c7ab1706166cea93.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libnum_integer-4431efb114b81eb7.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libpq_sys-9bd3f365c90b824b.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libsyn-bff1e5620bf9f169.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libunicode_xid-f45192a71fffe946.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libtime-21206bae916c8e9f.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libnum_traits-d95403325b93dccb.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libclap-65c382e5b97195aa.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libunicode_segmentation-077e3519e0fde862.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libvec_map-30b783050663ec47.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libbitflags-e290cd5819b8b8f3.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libansi_term-c475da7956866055.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libstrsim-138c1b6b5d3ec75f.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libunicode_width-532714aec7829268.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libterm_size-eeb1ee5b5e1eb249.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libbyteorder-97f20359cc6ae7fe.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libdotenv-c0ef68bcfc5b2489.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libregex-fdb9994f7c855b40.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libutf8_ranges-eee6e01646fa8d92.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libthread_local-6c1c3f7b9e578c1b.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libthread_id-daa3e2ddc51f8d14.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libaho_corasick-5c6bc25d8d3a791d.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libmemchr-e065dc882bfa2df6.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/liblibc-7cef59ab52023ebd.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libregex_syntax-99506361c8e90f54.rlib" "/tmp/cargo-install.CeErnkJsnvoy/release/deps/libquote-cfd383c7723d0075.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-2ddb28df747fcb8c.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-21709492a058d9ce.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-e19aa6725ab01bfd.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-99ff2e008613b591.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-e2513aecb8fbb70c.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-f3200ab7e7fe644c.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-e83ac2302b5439a3.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-dba58b8da674d203.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-6d4348bcabf40a71.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-9f45c45fdcba4301.rlib" "/home/francisco/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-b4ef8c9d93bc879a.rlib" "-l" "sqlite3" "-l" "sqlite3" "-l" "pq" "-l" "util" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util"
= note: /usr/bin/ld: cannot find -lsqlite3
/usr/bin/ld: cannot find -lsqlite3
collect2: error: ld returned 1 exit status
error: aborting due to previous error
error: failed to compile `diesel_cli v0.10.1`, intermediate artifacts can be found at `/tmp/cargo-install.CeErnkJsnvoy`
Caused by:
Could not compile `diesel_cli`.
I think you need to install libsqlite3-dev
Thanks @Eijebong. Solved. Should I use diesel 0.10.1 or 0.10?
0.10.1. If you specify diesel = { version = "0.10", features = ["sqlite"] } though, cargo will already pick the latest 0.10.x release.
Am 11.02.2017 um 12:52 schrieb Freinn notifications@github.com:
Thanks @Eijebong. Solved. Should I use diesel 0.10.1 or 0.10?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Thanks @killercup. I close because is solved.
For Fedora lovers: sudo dnf install libsqlite3x-devel
Most helpful comment
I think you need to install
libsqlite3-dev