DEV Community

Sam Erickson
Sam Erickson

Posted on

Installing diesel_cli on OpenSUSE Tumbleweed

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
Enter fullscreen mode Exit fullscreen mode

Then I get met with this fun error message:
Image of errors in a terminal.
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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

After installing this I was able to build diesel.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up