Sam Erickson
Posted on April 7, 2023
I recently ran into some issues installing diesel_cli on openSUSE. I wanted to use the package with postgres
only so I tried entering the following command from their getting started page:
# The package that is required according to the docs
zypper install libpq5
cargo install diesel_cli --no-default-features --features postgres
Then I get met with this fun error message:
The last few lines are of interest:
= note: /usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: cannot find -lpq: No such file or directory
collect2: error: ld returned 1 exit status
I started just installing all packages that I could find using zypper search
that related to postgres and tried the installation process of diesel_cli
after each one. Eventually, after much trial and error I found the missing package:
sudo zypper install ghc-postgresql-libpq-devel
After installing this I was able to build diesel
.
💖 💪 🙅 🚩
Sam Erickson
Posted on April 7, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.