-1

I am new in json and I don't know how to use but I found compare to XML json is better so, I am learning json in C programming in Ubuntu 14.0LTS.

I followed https://linuxprograms.wordpress.com/2010/05/20/install-json-c-in-linux/. In this link, I installed libjson0 with the help of first command but when I installed libjson – debug symbols package with the help of second command which is mentioned in link then showing "E: Unable to locate package libjson0-dbg".

Also I gone through https://github.com/json-c/json-c. After cloning moved to json-c directory, in json-c directory I did sh autogen.sh then showing "autogen.sh: 2: autogen.sh: autoreconf: not found".

Why autoreconf is not works ? When I installed CppUTest and other stuffs then it works.

I also install build-essential which found in google for above problems but it can't works for me.

How can I installed cjson in a proper manner and how to use with the C-programms.

Ravi
  • 13
  • 1
  • 7

2 Answers2

1

Try below commands:

$ sudo apt-get install libjson-glib-1.0-0 libjson-glib-1.0-0-dev

If you want to debug your programs and see the various steps of serializing/deserializing you can also install the libjson-glib – debug symbols package

$ sudo apt-get install libjson-glib-1.0-0-dbg

For documentation related to json-glib, you must install the following package

$ sudo apt-get install libjson-glib-1.0-0-doc

This documentation will then be available in file:///usr/share/gtk-doc/html/json-glib/index.html

  • When I tried for documentation related to json-glib then error occurred "E: Unable to locate package libjson-glib-1.0-0-doc E: Couldn't find any package by regex 'libjson-glib-1.0-0-doc' " – Ravi Jul 16 '15 at 04:12
  • You can download the libjson from this link http://sourceforge.net/projects/libjson/. After download just unzip it. You will get one PDF document which explains most of the features of this library. – Anshul Kant Saxena Jul 16 '15 at 12:36
0

Maybe your problem is related with the path.

The library is installed correctlly but you have tot tell the system where. Here a post on how to do it in Ubuntu How to set the environmental variable LD_LIBRARY_PATH in linux

Community
  • 1
  • 1
asantacreu
  • 192
  • 1
  • 3
  • 18