安装mysqlclient报错
The error message you’re seeing indicates that the pkg-config
utility is not installed on your system, or it is not able to find the necessary configuration for mysqlclient
. pkg-config
is used to determine the compilation options for libraries that are required by mysqlclient
.
Here’s how you can resolve this issue:
- Install
pkg-config
: If you’re on a macOS system, you can installpkg-config
using Homebrew:
On Ubuntu or Debian, you can install it using:brew install pkg-config
For other Linux distributions, use the appropriate package manager to installsudo apt-get install pkg-config
pkg-config
. - Install MySQL development headers: As mentioned before, you need the MySQL client development libraries and headers. If you haven’t already installed them, do so now: