你应该使用哪个 apt-get 命令包来安装 Ubuntu 上的 MySQL Connector C++?

huangapple go评论69阅读模式
英文:

What apt-get command package should I use to install MySQL Connector C++ for Ubuntu?

问题

我正在寻找编译我的C++代码

#include <mysqlx/xdevapi.h>

但是当我通过以下方式安装MySQL C++ Connector 8

sudo apt-get install libmysqlcppconn-dev

然后在我的Ubuntu发行版的/usr/include目录中找不到名为mysqlx的文件夹。

我还尝试安装

sudo apt-get install libmysqlcppconn7v5

但在/usr/include目录中没有出现xdevapi.h

问题:

我应该使用哪个apt-get命令包来安装MySQL C++ Connector

英文:

I'm looking for to compile my C++ code

 #include &lt;mysqlx/xdevapi.h&gt;

But when I install MySQL C++ Connector 8 via

sudo apt-get install libmysqlcppconn-dev

Then I won't get any folder named mysqlx inside /usr/include in my Ubuntu distro.

I also tried to install

sudo apt-get install libmysqlcppconn7v5

and no xdevapi.h was shown up inside the /usr/include folder.

Qustion:

What apt-get command package should I use to install the MySQL C++ Connector?

答案1

得分: 2

Ubuntu没有任何包含mysqlx/xdevapi.h的路径的软件包。

至于GitHub,你可以从这里下载Connector/C++ 8.0.33适用于Ubuntu的版本:https://dev.mysql.com/downloads/connector/cpp/

或者你可以从这里下载并安装Oracle MySQL APT仓库:https://dev.mysql.com/downloads/repo/apt/,然后执行以下命令:

sudo apt update
sudo apt install libmysqlcppconn-dev
英文:

Ubuntu doesn't have any package that have mysqlx/xdevapi.h in its path.

As for GitHub, you can download Connector/C++ 8.0.33 for Ubuntu from here: https://dev.mysql.com/downloads/connector/cpp/

Alternatively you can download and install Oracle MySQL APT Repository from here https://dev.mysql.com/downloads/repo/apt/ and after that

sudo apt update
sudo apt install libmysqlcppconn-dev

huangapple
  • 本文由 发表于 2023年6月26日 23:30:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/76558149.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定