diesel: Could not compile diesel_cli

Setup

Versions

  • Rust: rustc 1.33.0 (2aa4c46cf 2019-02-28)
  • Database: postgres
  • Operating System Ubuntu 18.04.1 LTS

Feature Flags

  • diesel: postgres

Problem Description

Unable to install diesel_cli

What is the actual output?

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

    Updating crates.io index
  Installing diesel_cli v1.4.0
   Compiling proc-macro2 v0.4.27
   Compiling cc v1.0.32
   Compiling libc v0.2.51
   Compiling unicode-xid v0.1.0
   Compiling memchr v2.2.0
   Compiling syn v0.15.29
   Compiling autocfg v0.1.2
   Compiling byteorder v1.3.1
   Compiling unicode-xid v0.0.4
   Compiling rand_core v0.4.0
   Compiling num-traits v0.2.6
   Compiling pq-sys v0.4.6
   Compiling num-integer v0.1.39
   Compiling serde v1.0.89
   Compiling regex v0.2.11
   Compiling smallvec v0.6.9
   Compiling lazy_static v1.3.0
   Compiling rustc-demangle v0.1.13
   Compiling cfg-if v0.1.7
   Compiling ucd-util v0.1.3
   Compiling matches v0.1.8
   Compiling quote v0.3.15
   Compiling bitflags v1.0.4
   Compiling unicode-width v0.1.5
   Compiling utf8-ranges v1.0.2
   Compiling ansi_term v0.11.0
   Compiling percent-encoding v1.0.1
   Compiling vec_map v0.8.1
   Compiling remove_dir_all v0.5.1
   Compiling strsim v0.7.0
   Compiling backtrace-sys v0.1.28
   Compiling backtrace v0.3.14
   Compiling rand_chacha v0.1.1
   Compiling rand_pcg v0.1.2
   Compiling rand v0.6.5
   Compiling synom v0.11.3
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.3
   Compiling unicode-normalization v0.1.8
   Compiling thread_local v0.3.6
   Compiling regex-syntax v0.5.6
   Compiling unicode-bidi v0.3.4
   Compiling textwrap v0.10.0
   Compiling syn v0.11.11
   Compiling rand_xorshift v0.1.1
   Compiling rand_isaac v0.1.1
   Compiling rand_hc v0.1.0
   Compiling idna v0.1.5
   Compiling quote v0.6.11
   Compiling rand_os v0.1.3
   Compiling atty v0.2.11
   Compiling time v0.1.42
   Compiling aho-corasick v0.6.10
   Compiling derive-error-chain v0.10.1
error: failed to compile `diesel_cli v1.4.0`, intermediate artifacts can be found at `/tmp/cargo-installAh6AoH`

Caused by:
  Could not compile `derive-error-chain`.

Caused by:
  process didn't exit successfully: `rustc --crate-name derive_error_chain /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/derive-error-chain-0.10.1/src/lib.rs --color always --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C opt-level=3 -C metadata=0f314aedb4e0a6c9 -C extra-filename=-0f314aedb4e0a6c9 --out-dir /tmp/cargo-installAh6AoH/release/deps -L dependency=/tmp/cargo-installAh6AoH/release/deps --extern quote=/tmp/cargo-installAh6AoH/release/deps/libquote-6c11d4fe1d50bb75.rlib --extern syn=/tmp/cargo-installAh6AoH/release/deps/libsyn-cf3b6b9bbadaa925.rlib --cap-lints allow` (signal: 9, SIGKILL: kill)

Checklist

  • I have already looked over the issue tracker for similar issues.
  • This issue can be reproduced on Rust’s stable channel. (Your issue will be closed if this is not the case)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 35 (9 by maintainers)

Most upvoted comments

i install

sudo apt install libpq-dev

and it works. Thanks Guys!

For Googlers;

You should build for your database, like:

# one of this
cargo install diesel_cli --no-default-features --features sqlite
cargo install diesel_cli --no-default-features --features postgres
cargo install diesel_cli --no-default-features --features mysql

And make sure these are installed on your system.

I have different logs for installing:

codee@ryzen3:~$ cargo install diesel_cli --no-default-features --features postgres
    Updating crates.io index
  Installing diesel_cli v1.4.0
   Compiling proc-macro2 v0.4.27
   Compiling cc v1.0.34
   Compiling unicode-xid v0.1.0
   Compiling libc v0.2.51
   Compiling syn v0.15.30
   Compiling memchr v2.2.0
   Compiling autocfg v0.1.2
   Compiling num-traits v0.2.6
   Compiling pq-sys v0.4.6
   Compiling byteorder v1.3.1
   Compiling unicode-xid v0.0.4
   Compiling rand_core v0.4.0
   Compiling ucd-util v0.1.3
   Compiling cfg-if v0.1.7
   Compiling smallvec v0.6.9
   Compiling quote v0.3.15
   Compiling regex v0.2.11
   Compiling num-integer v0.1.39
   Compiling lazy_static v1.3.0
   Compiling serde v1.0.89
   Compiling matches v0.1.8
   Compiling rustc-demangle v0.1.13
   Compiling utf8-ranges v1.0.2
   Compiling unicode-width v0.1.5
   Compiling bitflags v1.0.4
   Compiling ansi_term v0.11.0
   Compiling remove_dir_all v0.5.1
   Compiling percent-encoding v1.0.1
   Compiling strsim v0.7.0
   Compiling vec_map v0.8.1
   Compiling rand_chacha v0.1.1
   Compiling backtrace v0.3.14
   Compiling rand_pcg v0.1.2
   Compiling rand v0.6.5
   Compiling synom v0.11.3
   Compiling backtrace-sys v0.1.28
   Compiling regex-syntax v0.5.6
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.3
   Compiling unicode-normalization v0.1.8
   Compiling thread_local v0.3.6
   Compiling unicode-bidi v0.3.4
   Compiling textwrap v0.10.0
   Compiling rand_isaac v0.1.1
   Compiling rand_xorshift v0.1.1
   Compiling rand_hc v0.1.0
   Compiling syn v0.11.11
   Compiling rand_os v0.1.3
   Compiling time v0.1.42
   Compiling atty v0.2.11
   Compiling aho-corasick v0.6.10
   Compiling idna v0.1.5
   Compiling quote v0.6.11
   Compiling clap v2.32.0
   Compiling chrono v0.4.6
   Compiling url v1.7.2
   Compiling derive-error-chain v0.10.1
   Compiling tempfile v3.0.7
   Compiling error-chain v0.10.0
   Compiling diesel_derives v1.4.0
   Compiling serde_derive v1.0.89
   Compiling dotenv v0.10.1
   Compiling diesel v1.4.2
   Compiling toml v0.4.10
   Compiling migrations_internals v1.4.0
   Compiling diesel_cli v1.4.0
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.0.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.1.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.10.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.11.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.12.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.13.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.14.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.15.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.2.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.3.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.4.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.5.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.6.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.7.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.8.rcgu.o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.9.rcgu.o" "-o" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b" "/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.3zww99mfmc53sgk6.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/cargo-installtBXuAW/release/deps" "-L" "/tmp/cargo-installtBXuAW/release/build/backtrace-sys-c3fdfda3286dfeb7/out" "-L" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/cargo-installtBXuAW/release/deps/liburl-b0a144ac385c92d3.rlib" "/tmp/cargo-installtBXuAW/release/deps/libpercent_encoding-3c54b6b409caf9cc.rlib" "/tmp/cargo-installtBXuAW/release/deps/libidna-8736338779bf71a6.rlib" "/tmp/cargo-installtBXuAW/release/deps/libunicode_normalization-c6c83c4b4f063d60.rlib" "/tmp/cargo-installtBXuAW/release/deps/libsmallvec-f5b9c1662b5eedcd.rlib" "/tmp/cargo-installtBXuAW/release/deps/libunicode_bidi-9a7d8afa5f91ca2e.rlib" "/tmp/cargo-installtBXuAW/release/deps/libmatches-4480108f1ef64f65.rlib" "/tmp/cargo-installtBXuAW/release/deps/libtoml-e1779f25d4ccb3a8.rlib" "/tmp/cargo-installtBXuAW/release/deps/libtempfile-e1afe99710f5b97d.rlib" "/tmp/cargo-installtBXuAW/release/deps/libremove_dir_all-8c47dd167514aa2e.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand-51d51249a9835f8e.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand_xorshift-7492bf1def6bb26a.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand_pcg-0730bee4a5430f55.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand_hc-b2b5c08a30538d30.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand_chacha-7f5afa7cd2715e2a.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand_isaac-e6de3b95fae26f23.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand_core-2f4b230967d80f93.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand_os-67c51dd38350d3e6.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand_jitter-ed66d9521fa95bc6.rlib" "/tmp/cargo-installtBXuAW/release/deps/librand_core-788567e395963788.rlib" "/tmp/cargo-installtBXuAW/release/deps/libserde-fc46b82dbb3519a8.rlib" "/tmp/cargo-installtBXuAW/release/deps/libmigrations_internals-66c2af111d89a5db.rlib" "/tmp/cargo-installtBXuAW/release/deps/libdotenv-904ec4bce7ead678.rlib" "/tmp/cargo-installtBXuAW/release/deps/libregex-470f40897bce1347.rlib" "/tmp/cargo-installtBXuAW/release/deps/libutf8_ranges-e48bfb689e611da0.rlib" "/tmp/cargo-installtBXuAW/release/deps/libregex_syntax-d79d68dd5363fdb5.rlib" "/tmp/cargo-installtBXuAW/release/deps/libucd_util-57f7989c5c07c423.rlib" "/tmp/cargo-installtBXuAW/release/deps/libthread_local-092f9d6ccc082d3d.rlib" "/tmp/cargo-installtBXuAW/release/deps/liblazy_static-9967fb62f02a664b.rlib" "/tmp/cargo-installtBXuAW/release/deps/libaho_corasick-3f7aa807f2ff99de.rlib" "/tmp/cargo-installtBXuAW/release/deps/libmemchr-9f0cf6e5a1322d53.rlib" "/tmp/cargo-installtBXuAW/release/deps/liberror_chain-4c3078047c81b35a.rlib" "/tmp/cargo-installtBXuAW/release/deps/libbacktrace-fedf2d4773fd9cb2.rlib" "/tmp/cargo-installtBXuAW/release/deps/libbacktrace_sys-e741afdabdbbcaa4.rlib" "/tmp/cargo-installtBXuAW/release/deps/librustc_demangle-1027d023ad5a58c5.rlib" "/tmp/cargo-installtBXuAW/release/deps/libcfg_if-41f3583e7e446002.rlib" "/tmp/cargo-installtBXuAW/release/deps/libdiesel-2af2d07268ecdea1.rlib" "/tmp/cargo-installtBXuAW/release/deps/libpq_sys-3d4f6e98cd847220.rlib" "/tmp/cargo-installtBXuAW/release/deps/libbyteorder-602cc862f607f690.rlib" "/tmp/cargo-installtBXuAW/release/deps/libclap-83e2a2053c2ad0de.rlib" "/tmp/cargo-installtBXuAW/release/deps/libvec_map-699714b9fbf3bb2a.rlib" "/tmp/cargo-installtBXuAW/release/deps/libtextwrap-611a573871a5a9c3.rlib" "/tmp/cargo-installtBXuAW/release/deps/libunicode_width-c67327480cb3edbd.rlib" "/tmp/cargo-installtBXuAW/release/deps/libstrsim-1cd684f3bcd7452e.rlib" "/tmp/cargo-installtBXuAW/release/deps/libbitflags-21cb679825a027ab.rlib" "/tmp/cargo-installtBXuAW/release/deps/libatty-61f418d426de34d8.rlib" "/tmp/cargo-installtBXuAW/release/deps/libansi_term-5d02bf49ab7e1d32.rlib" "/tmp/cargo-installtBXuAW/release/deps/libchrono-eb43d05533cd8b76.rlib" "/tmp/cargo-installtBXuAW/release/deps/libnum_integer-b05f5d4e9600144f.rlib" "/tmp/cargo-installtBXuAW/release/deps/libnum_traits-3a019df363a5f909.rlib" "/tmp/cargo-installtBXuAW/release/deps/libtime-c07689338d581aaf.rlib" "/tmp/cargo-installtBXuAW/release/deps/liblibc-1dc47802d96d2bda.rlib" "-Wl,--start-group" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e39317eb74365d3c.rlib" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4d55a38564aae54a.rlib" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-f8521075e248b627.rlib" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-7c91ffdc8da860d3.rlib" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0ad27b9879d551d3.rlib" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-588f18eae3ea58be.rlib" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-4ebf5caee903d98f.rlib" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-8895b32baedb08c6.rlib" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-6a9d233d01acc350.rlib" "-Wl,--end-group" "/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-851bb3b5f6c4db49.rlib" "-Wl,-Bdynamic" "-lpq" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: /usr/bin/ld: cannot find -lpq
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: failed to compile `diesel_cli v1.4.0`, intermediate artifacts can be found at `/tmp/cargo-installtBXuAW`

Caused by:
  Could not compile `diesel_cli`.

To learn more, run the command again with --verbose.
codee@ryzen3:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           3.4G        1.5G        934M         55M        1.0G        1.6G
Swap:          2.0G        2.5M        2.0G

codee@ryzen3:~/rust/ruster$ cargo -V
cargo 1.33.0 (f099fe94b 2019-02-12)

codee@ryzen3:~/rust/ruster$ rustup -V
rustup 1.17.0 (069c88ed6 2019-03-05)

codee@ryzen3:~/rust/ruster$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic

@IamSaquib

If you are on ubuntu, try:

sudo apt install -y libdbus-1-dev libsqlite3-dev

Had the same issue today. I use arch/manjaro. I installed

libmariadbclient postgresql-libs sqlite

@ramsayleung answer helped me! Here are the steps followed to successfully install the cli app

sudo dd if=/dev/zero of=/swapfile bs=1M count=2048
sudo chmod 600 /swapfile

Check a file was made

ls -l /swapfile 

# OUTPUT
# -rw------- 1 root root 2147483648 Jun 26 15:29 /swapfile

Setup file as swap

sudo mkswap /swapfile
sudo swapon /swapfile

Check that it worked

swapon -s

# OUTPUT
# Filename				        Type		Size	Used	Priority
# /swapfile                              	file    	2097148	22016	-2

Lastly setup swap to work on boot

sudo nano etc/fstab

# ADD LINES
# /swapfile swap swap defaults 0 0

Now install Diesel!

cargo install diesel_cli

# OUTPUT
# Compiling diesel_cli v1.4.0
# Finished release [optimized] target(s) in 7m 51s
# Installing /home/ec2-user/.cargo/bin/diesel

woooo profit

sudo apt install libsqlite3-dev

sudo apt install libpq-dev

sudo apt install libmysqlclient-dev

I had to install the proper things and then run a more specific CLI bundle.

First I had to install mysql-server and get it set up. Then:

sudo apt install libpq-dev libmysqlclient-dev cargo install diesel_cli --no-default-features --features postgres

I have the same error on my VPS with 521M RAM when compiling diesel_cli, and I am sure I have installed libpq-dev and other dependencies. After suffering for a few days, I fix this error with creating a 2G swapfile to alleviate some of pressure on RAM, and diesel_cli works perfectly now.

I am creating CRUD for using sqlite When i did cargo install diesel_cli --no-default-features --features sqlite I got this error

`note: /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 v1.4.0, intermediate artifacts can be found at /tmp/cargo-installoNhOKu

How to link library for sqlite? I have sqlite3 installed in my system

@paulocsanz You may want to look into diesel_migrations to run migrations without building diesel_cli.

You’re missing the postgres library 😃 I’m not 100% sure, but the postgresql or postgresql-devel should contain what you are looking for.

On Wed, 3 Apr 2019, 06:33 Ace Besmonte, notifications@github.com wrote:

I have different logs for installing:

codee@ryzen3:~$ cargo install diesel_cli --no-default-features --features postgres Updating crates.io index Installing diesel_cli v1.4.0 Compiling proc-macro2 v0.4.27 Compiling cc v1.0.34 Compiling unicode-xid v0.1.0 Compiling libc v0.2.51 Compiling syn v0.15.30 Compiling memchr v2.2.0 Compiling autocfg v0.1.2 Compiling num-traits v0.2.6 Compiling pq-sys v0.4.6 Compiling byteorder v1.3.1 Compiling unicode-xid v0.0.4 Compiling rand_core v0.4.0 Compiling ucd-util v0.1.3 Compiling cfg-if v0.1.7 Compiling smallvec v0.6.9 Compiling quote v0.3.15 Compiling regex v0.2.11 Compiling num-integer v0.1.39 Compiling lazy_static v1.3.0 Compiling serde v1.0.89 Compiling matches v0.1.8 Compiling rustc-demangle v0.1.13 Compiling utf8-ranges v1.0.2 Compiling unicode-width v0.1.5 Compiling bitflags v1.0.4 Compiling ansi_term v0.11.0 Compiling remove_dir_all v0.5.1 Compiling percent-encoding v1.0.1 Compiling strsim v0.7.0 Compiling vec_map v0.8.1 Compiling rand_chacha v0.1.1 Compiling backtrace v0.3.14 Compiling rand_pcg v0.1.2 Compiling rand v0.6.5 Compiling synom v0.11.3 Compiling backtrace-sys v0.1.28 Compiling regex-syntax v0.5.6 Compiling rand_core v0.3.1 Compiling rand_jitter v0.1.3 Compiling unicode-normalization v0.1.8 Compiling thread_local v0.3.6 Compiling unicode-bidi v0.3.4 Compiling textwrap v0.10.0 Compiling rand_isaac v0.1.1 Compiling rand_xorshift v0.1.1 Compiling rand_hc v0.1.0 Compiling syn v0.11.11 Compiling rand_os v0.1.3 Compiling time v0.1.42 Compiling atty v0.2.11 Compiling aho-corasick v0.6.10 Compiling idna v0.1.5 Compiling quote v0.6.11 Compiling clap v2.32.0 Compiling chrono v0.4.6 Compiling url v1.7.2 Compiling derive-error-chain v0.10.1 Compiling tempfile v3.0.7 Compiling error-chain v0.10.0 Compiling diesel_derives v1.4.0 Compiling serde_derive v1.0.89 Compiling dotenv v0.10.1 Compiling diesel v1.4.2 Compiling toml v0.4.10 Compiling migrations_internals v1.4.0 Compiling diesel_cli v1.4.0 error: linking with cc failed: exit code: 1 | = note: “cc” “-Wl,–as-needed” “-Wl,-z,noexecstack” “-m64” “-L” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.0.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.1.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.10.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.11.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.12.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.13.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.14.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.15.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.2.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.3.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.4.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.5.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.6.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.7.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.8.rcgu.o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.diesel.cx7gqjdg-cgu.9.rcgu.o” “-o” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b” “/tmp/cargo-installtBXuAW/release/deps/diesel-aa9646480af8333b.3zww99mfmc53sgk6.rcgu.o” “-Wl,–gc-sections” “-pie” “-Wl,-zrelro” “-Wl,-znow” “-Wl,-O1” “-nodefaultlibs” “-L” “/tmp/cargo-installtBXuAW/release/deps” “-L” “/tmp/cargo-installtBXuAW/release/build/backtrace-sys-c3fdfda3286dfeb7/out” “-L” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib” “-Wl,-Bstatic” “/tmp/cargo-installtBXuAW/release/deps/liburl-b0a144ac385c92d3.rlib” “/tmp/cargo-installtBXuAW/release/deps/libpercent_encoding-3c54b6b409caf9cc.rlib” “/tmp/cargo-installtBXuAW/release/deps/libidna-8736338779bf71a6.rlib” “/tmp/cargo-installtBXuAW/release/deps/libunicode_normalization-c6c83c4b4f063d60.rlib” “/tmp/cargo-installtBXuAW/release/deps/libsmallvec-f5b9c1662b5eedcd.rlib” “/tmp/cargo-installtBXuAW/release/deps/libunicode_bidi-9a7d8afa5f91ca2e.rlib” “/tmp/cargo-installtBXuAW/release/deps/libmatches-4480108f1ef64f65.rlib” “/tmp/cargo-installtBXuAW/release/deps/libtoml-e1779f25d4ccb3a8.rlib” “/tmp/cargo-installtBXuAW/release/deps/libtempfile-e1afe99710f5b97d.rlib” “/tmp/cargo-installtBXuAW/release/deps/libremove_dir_all-8c47dd167514aa2e.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand-51d51249a9835f8e.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand_xorshift-7492bf1def6bb26a.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand_pcg-0730bee4a5430f55.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand_hc-b2b5c08a30538d30.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand_chacha-7f5afa7cd2715e2a.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand_isaac-e6de3b95fae26f23.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand_core-2f4b230967d80f93.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand_os-67c51dd38350d3e6.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand_jitter-ed66d9521fa95bc6.rlib” “/tmp/cargo-installtBXuAW/release/deps/librand_core-788567e395963788.rlib” “/tmp/cargo-installtBXuAW/release/deps/libserde-fc46b82dbb3519a8.rlib” “/tmp/cargo-installtBXuAW/release/deps/libmigrations_internals-66c2af111d89a5db.rlib” “/tmp/cargo-installtBXuAW/release/deps/libdotenv-904ec4bce7ead678.rlib” “/tmp/cargo-installtBXuAW/release/deps/libregex-470f40897bce1347.rlib” “/tmp/cargo-installtBXuAW/release/deps/libutf8_ranges-e48bfb689e611da0.rlib” “/tmp/cargo-installtBXuAW/release/deps/libregex_syntax-d79d68dd5363fdb5.rlib” “/tmp/cargo-installtBXuAW/release/deps/libucd_util-57f7989c5c07c423.rlib” “/tmp/cargo-installtBXuAW/release/deps/libthread_local-092f9d6ccc082d3d.rlib” “/tmp/cargo-installtBXuAW/release/deps/liblazy_static-9967fb62f02a664b.rlib” “/tmp/cargo-installtBXuAW/release/deps/libaho_corasick-3f7aa807f2ff99de.rlib” “/tmp/cargo-installtBXuAW/release/deps/libmemchr-9f0cf6e5a1322d53.rlib” “/tmp/cargo-installtBXuAW/release/deps/liberror_chain-4c3078047c81b35a.rlib” “/tmp/cargo-installtBXuAW/release/deps/libbacktrace-fedf2d4773fd9cb2.rlib” “/tmp/cargo-installtBXuAW/release/deps/libbacktrace_sys-e741afdabdbbcaa4.rlib” “/tmp/cargo-installtBXuAW/release/deps/librustc_demangle-1027d023ad5a58c5.rlib” “/tmp/cargo-installtBXuAW/release/deps/libcfg_if-41f3583e7e446002.rlib” “/tmp/cargo-installtBXuAW/release/deps/libdiesel-2af2d07268ecdea1.rlib” “/tmp/cargo-installtBXuAW/release/deps/libpq_sys-3d4f6e98cd847220.rlib” “/tmp/cargo-installtBXuAW/release/deps/libbyteorder-602cc862f607f690.rlib” “/tmp/cargo-installtBXuAW/release/deps/libclap-83e2a2053c2ad0de.rlib” “/tmp/cargo-installtBXuAW/release/deps/libvec_map-699714b9fbf3bb2a.rlib” “/tmp/cargo-installtBXuAW/release/deps/libtextwrap-611a573871a5a9c3.rlib” “/tmp/cargo-installtBXuAW/release/deps/libunicode_width-c67327480cb3edbd.rlib” “/tmp/cargo-installtBXuAW/release/deps/libstrsim-1cd684f3bcd7452e.rlib” “/tmp/cargo-installtBXuAW/release/deps/libbitflags-21cb679825a027ab.rlib” “/tmp/cargo-installtBXuAW/release/deps/libatty-61f418d426de34d8.rlib” “/tmp/cargo-installtBXuAW/release/deps/libansi_term-5d02bf49ab7e1d32.rlib” “/tmp/cargo-installtBXuAW/release/deps/libchrono-eb43d05533cd8b76.rlib” “/tmp/cargo-installtBXuAW/release/deps/libnum_integer-b05f5d4e9600144f.rlib” “/tmp/cargo-installtBXuAW/release/deps/libnum_traits-3a019df363a5f909.rlib” “/tmp/cargo-installtBXuAW/release/deps/libtime-c07689338d581aaf.rlib” “/tmp/cargo-installtBXuAW/release/deps/liblibc-1dc47802d96d2bda.rlib” “-Wl,–start-group” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-e39317eb74365d3c.rlib” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-4d55a38564aae54a.rlib” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-f8521075e248b627.rlib” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-7c91ffdc8da860d3.rlib” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0ad27b9879d551d3.rlib” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-588f18eae3ea58be.rlib” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-4ebf5caee903d98f.rlib” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-8895b32baedb08c6.rlib” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-6a9d233d01acc350.rlib” “-Wl,–end-group” “/home/codee/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-851bb3b5f6c4db49.rlib” “-Wl,-Bdynamic” “-lpq” “-lutil” “-lutil” “-ldl” “-lrt” “-lpthread” “-lgcc_s” “-lc” “-lm” “-lrt” “-lpthread” “-lutil” “-lutil” = note: /usr/bin/ld: cannot find -lpq collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: failed to compile diesel_cli v1.4.0, intermediate artifacts can be found at /tmp/cargo-installtBXuAW

Caused by: Could not compile diesel_cli.

To learn more, run the command again with --verbose. codee@ryzen3:~$ free -h total used free shared buff/cache available Mem: 3.4G 1.5G 934M 55M 1.0G 1.6G Swap: 2.0G 2.5M 2.0G

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/diesel-rs/diesel/issues/2026#issuecomment-479336109, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMxqZ7BvHbPjwIEM5vs9D5uFECEil3Dks5vdC8WgaJpZM4cWcVi .