August 6, 2020•94 words
Every time I try to install Diesel.rs on one of my Ubuntu machines, I run into the same error:
/usr/bin/ld: cannot find -lpq
It always takes a bit of time to remember how to fix it, so I'm throwing this on my blog for future reference.
👋 Hey future me, it looks like you're trying to do some Rust programming with Diesel again. Cool! At this point though, you might want to consider moving off of Ubuntu. These problems are annoying!
But, until that day, just do this:
apt-get install libpq-dev