英文:
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 <mysqlx/xdevapi.h>
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论