g++:缺少 MySQL 库

问题描述 投票:0回答:1

我正在尝试安装 Ubuntu 22.0 的 C++ MySQL 插件。我尝试使用以下 bash 命令:

apt-get install libmysqlcppconn-dev

这些命令在我以前的 Ubuntu 操作系统中有效,但在我当前的操作系统中使用 g++ 编译时遇到以下错误:

fatal error: mysql/mysql.h: No such file or directory
   29 | #include <mysql/mysql.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.

c++ mysql database ubuntu g++
1个回答
0
投票

apt-get 安装 libmysqlclient-dev

© www.soinside.com 2019 - 2024. All rights reserved.