解决Ubuntu16.04 fatal error: json/json.h: No such file or directory
错误产生
安装json-c库之后,根据GitHub上面的readme文件链接到json-c库时出现以下错误:
SDMBNJson.h:9:23: fatal error: json/json.h: No such file or directory
#include <json/json.h>
^
compilation terminated.
贴出readme:
Linking to `libjson-c`
----------------------
If your system has `pkgconfig`,
then you can just add this to your `makefile`:
\```make
CFLAGS += $(shell pkg-config --cflags json-c)
LDFLAGS += $(shell pkg-config --libs json-c)
\ ```
Without `pkgconfig`, you would do something like this:
\```make
JSON_C_DIR=/path/to/json_c/install
CFLAGS += -I$(JSON_C_DIR)/include/json-c
LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c
\```
可是,按照readme上面的做法还是无法解决问题。
解决方案
在Linux系统中,/usr/include/ 是C/C++等的头文件放置处,当使用源代码方式安装某些数据时,会使用到其中很多文件。因此将编译安装完成的json-c文件夹改名为“json”放在/usr/include/目录下,即可解决:
cd /usr/include
sudo mkdir json
sudo cp /usr/local/include/json-c/* /usr/include/json/
解决Ubuntu16.04 fatal error: json/json.h: No such file or directory的更多相关文章
- ubuntu16.04 编译出错:fatal error: SDL/SDL.h: No such file or directory
在ubuntu 16.04编译神经网络代码时候,遇到了这样一种错误? fatal error: SDL/SDL.h: No such file or directory 原因是SDL库没有安装,根据你 ...
- lua.c:82:10: fatal error: readline/readline.h: No such file or directory #include <readline/readline.h>
make linuxcd src && make linuxmake[1]: Entering directory `/root/lua/lua-5.3.2/src'make all ...
- lua.c:80:31: fatal error: readline/readline.h: No such file or directory
make linuxcd src && make linuxmake[1]: Entering directory `/root/lua/lua-5.3.2/src'make all ...
- 【Redis】编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory
[Redis]编译错误zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory 在安装redis进行编译 ...
- fatal error: openssl/bn.h: No such file or directory
出现如下错误 fatal error: openssl/bn.h: No such file or directory 解决办法 # sudo apt-get install libssl-dev
- fatal error: linux/videodev.h: No such file or directory
Run Build Command:"/usr/bin/make" "cmTC_162a3/fast"/usr/bin/make -f CMakeFiles/c ...
- 全志TinaLinux编译错误fatal error: unicode/ucnv.h: No such file or directory
今天开始正式干活了 拿到一个全志Tina的板子还有一个SDK压缩包,要求我这周(只剩一天半...)就要把sdk编译通过并且把板子跑起来. 还特别跟我说他们试了下这个sdk编译没法通过,会报错... 竟 ...
- fatal error: openssl/sha.h: No such file or directory 解决方案
出现这个或者fatal error: openssl/名单.h: No such file or directory.都是没有安装libssl-dev- libssl-dev包含libraries, ...
- 编译内核时出现drivers/mfd/mxc-hdmi-core.c:36:24: fatal error: mach/clock.h: No such file or directory
在学习恩智浦IMX6D开发板时,编译内核出现 drivers/mfd/mxc-hdmi-core.c::: fatal error: mach/clock.h: No such file or dir ...
- msgsrvmgr.cpp:5:37: fatal error: kdl_conversions/kdl_msg.h: No such file or directory #include <kdl_conversions/kdl_msg.h>
/home/xxx/ros_workspace/src/bp_protocol_bridge/protospot/src/msgsrvmgr.cpp::: fatal error: kdl_conve ...
随机推荐
- WebGl 旋转(矩阵变换)
代码1: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF- ...
- jdk 配置
JDK (绿色版) 此次安装的 JDK 版本为 1.8.0_77 步骤一: 拷贝 JDK(350M左右)到电脑 步骤二: 配置环境变量 JAVA_HOME , PATH , CLA ...
- 微信小程序——长按复制、一键复制
wxml: 订单号:<text selectable='true' bindlongtap='copy' >{{OrderModel.OrderNo}}</text><b ...
- android studio 插件开发(自动生成框架代码插件)
android studio 插件开发 起因 去年公司开始上新项目,正好android在架构这方面的讨论也开始多了起来,于是mvp架构模型就进入我们技术选择方案里面,mvp有很多好处,但是有一个非常麻 ...
- windows系统下系统变量path误删恢复方法
每台计算机安装程序不同,环境变量path会有不同,若误删了环境变量path,可以如下完美解决. Win+R 输入regedit打开注册表(开始-运行里输入regedit) 找到 HKEY_LOC ...
- React with webpack
//entry.js require("!style!css!./style.css"); require("./hello.jsx"); // documen ...
- PyQt5 结合 matplotlib 时,如何显示其 NavigationToolbar
本文目的:展示 PyQt5 结合 matplotlib 时,如何显示其 NavigationToolbar. 本人搜遍所有网络无果,没办法,查看PyQt5源代码,最终才搞明白...特此留记. 〇.Py ...
- IDEA 运行报错 failed to create a child event loop
背景 在IDEA中写了测试代码,但是运行的时候一直提示 java.lang.IllegalStateException: failed to create a child event loop ... ...
- Hadoop项目结构
Hadoop是一个由Apache基金会所开发的分布式系统基础架构. 用户可以在不了解分布式底层细节的情况下,开发分布式程序.充分利用集群的威力进行高速运算和存储. Hadoop实现了一个分布式文件系统 ...
- Base64编码后通过Url传值
Base64编码简介 Base编码使用"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",再加上补 ...