6

During configuration of one project, I got the error:

checking for JSON... no
no
configure: error: 
You must have JSON-GLib >= 0.14.0 development headers installed to build.

make: *** [config.status] Error 1

The configure script contains such strings:

$ cat configure | grep json-glib
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-glib-1.0 >= 0.14.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "json-glib-1.0 >= 0.14.0") 2>&5
  pkg_cv_JSON_CFLAGS=`$PKG_CONFIG --cflags "json-glib-1.0 >= 0.14.0" 2>/dev/null`
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-glib-1.0 >= 0.14.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "json-glib-1.0 >= 0.14.0") 2>&5
  pkg_cv_JSON_LIBS=`$PKG_CONFIG --libs "json-glib-1.0 >= 0.14.0" 2>/dev/null`
            JSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "json-glib-1.0 >= 0.14.0" 2>&1`
            JSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "json-glib-1.0 >= 0.14.0" 2>&1`

So I assumed I need package json-glib-1.0 but it seems to be installed:

$ apt-cache policy json-glib-1.0
libjson-glib-1.0-common:
  Installed: 0.16.2-1ubuntu1
  Candidate: 0.16.2-1ubuntu1
  Version table:
 *** 0.16.2-1ubuntu1 0
        500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
libjson-glib-1.0-0-dbg:
  Installed: (none)
  Candidate: 0.16.2-1ubuntu1
  Version table:
     0.16.2-1ubuntu1 0
        500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
gir1.0-json-glib-1.0:
  Installed: (none)
  Candidate: (none)
  Version table:
gir1.2-json-glib-1.0:
  Installed: (none)
  Candidate: (none)
  Version table:
libjson-glib-1.0-0:
  Installed: 0.16.2-1ubuntu1
  Candidate: 0.16.2-1ubuntu1
  Version table:
 *** 0.16.2-1ubuntu1 0
        500 http://ru.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Does anyone know which package should I install? In the case it does matter, the source is Pidgin 3.0 development branch. Everything I found in Google is only a message about changing json-glib to 0.14 version.

As raaz suggested below, I downloaded, converted and installed RPM via alien. But the configure script produces the same error, even with the newest version of package.

$ dpkg -L json-glib-devel | grep include
/usr/include
/usr/include/json-glib-1.0
/usr/include/json-glib-1.0/json-glib
/usr/include/json-glib-1.0/json-glib/json-gvariant.h
/usr/include/json-glib-1.0/json-glib/json-builder.h
/usr/include/json-glib-1.0/json-glib/json-gobject.h
/usr/include/json-glib-1.0/json-glib/json-version.h
/usr/include/json-glib-1.0/json-glib/json-parser.h
/usr/include/json-glib-1.0/json-glib/json-reader.h
/usr/include/json-glib-1.0/json-glib/json-path.h
/usr/include/json-glib-1.0/json-glib/json-enum-types.h
/usr/include/json-glib-1.0/json-glib/json-glib.h
/usr/include/json-glib-1.0/json-glib/json-generator.h
/usr/include/json-glib-1.0/json-glib/json-types.h
15

The development files for json-glib can be installed through the normal software repositories, there's no need to get them from a different distro and converting packages!

sudo apt-get install libjson-glib-dev

When compiling an application and the configure script complains about missing dependencies, you'll need the development files (in 99% of the cases). In Ubuntu these are marked by a -dev at the end of the package name.

1
  • Thanks Timo. I was already directed to it on #pidgin and #ubuntu-motu channels at freenode.net. However, your answer is correct, so I'm marking it accordingly. – Danatela May 16 '14 at 3:33
1

I have found it but in RPM format. You still have a chance . convert that rpm to deb.

Download RPM with

wget http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/16/Fedora/i386/os/Packages/json-glib-devel-0.14.0-1.fc16.i686.rpm

for 32-bit architecture, and

wget http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/16/Fedora/x86_64/os/Packages/json-glib-devel-0.14.0-1.fc16.x86_64.rpm

for 64-bit architecture.

Then convert that into deb with alien

sudo apt-get install alien
alien -k json-glib-devel-0.14.0-1.fc16.<architecture>.rpm

That will create a .DEB and you can install a DEB with

sudo dpkg -i filename.deb

Hope that helps. Any doubts/problems let me know.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.