Solution:
The problem is cargo cannot locate the pq library, so i need to use:
sudo apt install libpq-dev
This send me a error too:
The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.
Please visit http://www.java.com for information on installing Java.
First
I need to check Environment Variables, check your file:
% open -e .bash_profile
File content:
export JAVA_HOME=$(/usr/libexec/java_home)
But the error continue... so then that doesnt help me. I think sometimes just need this, in my case i install the elements by one bye with brew.
Second:
Install postgreql
brew install postgresql
Third:Install libpq
brew install libpq
Finally: Install diesel CLI
cargo install diesel_cli --no-default-features --features postgres