在Ubuntu体系中,已经安装了mysql,即应用sudo apt-get install mysql-server mysql-client

但是用C编译mysql数据库时,报错
fatal error: mysql.h: No such file or directory
出现这个错误是因为体系没有安装mysql开发库

执行下面指令安装
sudo apt-get install libmysql++-dev
编译时须要加连接-lmysqlclient.

编译源法度的时辰,如下号令:

gcc -I/usr/include/mysql *.c -L/usr/lib/mysql -lmysqlclient -o *

ubuntu安装了mysql 但是编译报错 mysql.h: No such file or directory的更多相关文章

  1. VS 2015 报错 " 'unistd.h': No such file or directory" 的解决办法

    使用 Visual Studio 2015 进行程序开发工作时,如果编译的是来自于Linux平台的源文件,该源文件可能会包含头文件 uninstd.h,这样会产生报错信息: "fatal e ...

  2. Qt编译错误“GL/gl.h:No such file or directory”的解决方法

    备注:1)操作系统:Ubuntu-14.04或12.042)Linux用户:root3)Qt版本:qt-linux-opensource-5.2.0-x86 为了迎接Qt的新纪元(从诺基亚移居到芬兰公 ...

  3. Qt编译出错 GL/gl.h:No such file or directory

    系统:Ubuntu18.04 软件:QtCreator4.8 Qt5.9.8 编译Qt Widgets Application类型的项目时,出现错误,提示: GL/gl.h: No such file ...

  4. 在cocos2d-x-3.0 android 平台编译时提示CocosGUI.h: No such file or directory

    分类是个让人蛋疼的事情,所幸自己的博客自己做主.这是个高兴的开始. 每天抽空玩2048,终于忍受不住,于是决定自己从网上download下源码,自己编译一个出来.所有的事情都很容易,除了操蛋的中文注释 ...

  5. tar 解压bz2报错 Cannot exec: No such file or directory

    tar: bzip2: Cannot exec: No such file or directorytar: Error is not recoverable: exiting now 需要安装bzi ...

  6. Qt编译错误GL/gl.h: No such file or directory

          近期把系统换成ubuntu14.04的了.在安装Qt后,我执行了里面的一个演示样例,发现编译有错: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQ ...

  7. php win/linux/mac 安装redis扩展或者扩展报错 zend_smart_str.h file not found

    1 windows 安装reids 扩展 根据phpinfo 查看php信息.在pecl.php.net 下载对应的redis扩展版本,放如扩展目录,在php.ini 配置扩展信息,重启服务 2 li ...

  8. 解决编译报错:Unable to copy file, because it is being used by another process.

    Error    63    Unable to copy file "D:\DEV\XXX Website\trunk\4 Source Code\Common\WebControls\b ...

  9. Ubuntu 16.04 编译OpenCV 问题解决stdlib.h: No such file or directory

    https://blog.csdn.net/xinyu391/article/details/72867510 https://ask.csdn.net/questions/365969

随机推荐

  1. HttpContext.Current and Web Api

    Using HttpContext.Current in WebApi is dangerous because of async HttpContext.Current gets the curre ...

  2. (译)综合指南:通过Ubuntu 16.04上从Source构建来安装支持GPU的Caffe2

    (译)综合指南:通过Ubuntu 16.04上从Source构建来安装支持GPU的Caffe2 译者注: 原文来自:https://tech.amikelive.com/node-706/compre ...

  3. POJ 2240 Arbitrage(判正环)

    http://poj.org/problem?id=2240 题意:货币兑换,判断最否是否能获利. 思路:又是货币兑换题,Belloman-ford和floyd算法都可以的. #include< ...

  4. c++ 字符串拷贝以及合并

    #include<iostream> #include<string> using namespace std; class stringfun { ]; public: vo ...

  5. JAVA-随机生成四则运算

    代码如下: package jiajianchengchu; import java.util.*; public class jisuan { public static String yuefen ...

  6. window.frames && iframe 跨页面通信

    1.定义 frames[]是窗口中所有命名的框架组成的数组.这个数组的每个元素都是一个Window对象,对应于窗口中的一个框架. 2.用法 假设iframe 是一个以存在的 iframe 的 ID 和 ...

  7. vue 脚手架(二,项目依赖说明 package.json)

    本文以转移至本人的个人博客,请多多关注! 本文以转移至本人的个人博客,请多多关注! 本文以转移至本人的个人博客,请多多关注! 本文以转移至本人的个人博客,请多多关注! 继续上一篇, 上一篇讲了 vue ...

  8. 各种排序算法思想复杂度及其java程序实现

    一.冒泡排序(BubbleSort)1. 基本思想: 设排序表长为n,从后向前或者从前向后两两比较相邻元素的值,如果两者的相对次序不对(A[i-1] > A[i]),则交换它们, 其结果是将最小 ...

  9. hdu 3689 杭州 10 现场 J - Infinite monkey theorem 概率dp kmp 难度:1

    J - Infinite monkey theorem Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d &am ...

  10. 让IE兼容console——“由于出现错误80020101而导致此项操作无法完成”的解决方案

    问题描述 经测试发现问题只出现在: 1.原生IE8(其他版本IE模拟出的IE8无此问题) 2.从打开IE8没有开启过F12(曾经开启过又关闭的无此问题) IE8报错“由于出现错误80020101而导致 ...