Package 'libbson-static-1.0', required by 'libmongocrypt', not found

Error printing enabled by default due to use of output options besides --exists, --atleast/exact/max-version or --list-all. Value of --silence-errors: 0
Error printing enabled
Adding virtual 'pkg-config' package to list of known packages
Cannot open directory #1 '/usr/local/lib/x86_64-linux-gnu/pkgconfig' in package search path: No such file or directory
Cannot open directory #2 '/usr/local/lib/pkgconfig' in package search path: No such file or directory
Cannot open directory #3 '/usr/local/share/pkgconfig' in package search path: No such file or directory
Scanning directory #4 '/usr/lib/x86_64-linux-gnu/pkgconfig'
File 'libkms_message.pc' appears to be a .pc file
Will find package 'libkms_message' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/libkms_message.pc'
File 'xdmcp.pc' appears to be a .pc file
Will find package 'xdmcp' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/xdmcp.pc'
File 'kdb.pc' appears to be a .pc file
Will find package 'kdb' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/kdb.pc'
File 'ice.pc' appears to be a .pc file
Will find package 'ice' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/ice.pc'
File 'pthread-stubs.pc' appears to be a .pc file
Will find package 'pthread-stubs' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/pthread-stubs.pc'
Ignoring file '..' in search directory; not a .pc file
File 'com_err.pc' appears to be a .pc file
Will find package 'com_err' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/com_err.pc'
File 'krb5-gssapi.pc' appears to be a .pc file
Will find package 'krb5-gssapi' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/krb5-gssapi.pc'
Ignoring file '.' in search directory; not a .pc file
File 'kadm-client.pc' appears to be a .pc file
Will find package 'kadm-client' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/kadm-client.pc'
File 'xcb.pc' appears to be a .pc file
Will find package 'xcb' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/xcb.pc'
File 'mit-krb5.pc' appears to be a .pc file
Will find package 'mit-krb5' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/mit-krb5.pc'
File 'libmongocrypt.pc' appears to be a .pc file
Will find package 'libmongocrypt' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/libmongocrypt.pc'
File 'xt.pc' appears to be a .pc file
Will find package 'xt' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/xt.pc'
File 'kadm-server.pc' appears to be a .pc file
Will find package 'kadm-server' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/kadm-server.pc'
File 'x11.pc' appears to be a .pc file
Will find package 'x11' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/x11.pc'
File 'mit-krb5-gssapi.pc' appears to be a .pc file
Will find package 'mit-krb5-gssapi' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/mit-krb5-gssapi.pc'
File 'xau.pc' appears to be a .pc file
Will find package 'xau' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/xau.pc'
File 'krb5.pc' appears to be a .pc file
Will find package 'krb5' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/krb5.pc'
Ignoring file 'mit-krb5' in search directory; not a .pc file
File 'sm.pc' appears to be a .pc file
Will find package 'sm' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/sm.pc'
File 'gssrpc.pc' appears to be a .pc file
Will find package 'gssrpc' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/gssrpc.pc'
File 'libmongocrypt-static.pc' appears to be a .pc file
Will find package 'libmongocrypt-static' in file '/usr/lib/x86_64-linux-gnu/pkgconfig/libmongocrypt-static.pc'
Scanning directory #5 '/usr/lib/pkgconfig'
Ignoring file '..' in search directory; not a .pc file
Ignoring file '.' in search directory; not a .pc file
Scanning directory #6 '/usr/share/pkgconfig'
File 'xproto.pc' appears to be a .pc file
Will find package 'xproto' in file '/usr/share/pkgconfig/xproto.pc'
File 'fontsproto.pc' appears to be a .pc file
Will find package 'fontsproto' in file '/usr/share/pkgconfig/fontsproto.pc'
File 'xorg-sgml-doctools.pc' appears to be a .pc file
Will find package 'xorg-sgml-doctools' in file '/usr/share/pkgconfig/xorg-sgml-doctools.pc'
File 'shared-mime-info.pc' appears to be a .pc file
Will find package 'shared-mime-info' in file '/usr/share/pkgconfig/shared-mime-info.pc'
File 'videoproto.pc' appears to be a .pc file
Will find package 'videoproto' in file '/usr/share/pkgconfig/videoproto.pc'
File 'applewmproto.pc' appears to be a .pc file
Will find package 'applewmproto' in file '/usr/share/pkgconfig/applewmproto.pc'
Ignoring file '..' in search directory; not a .pc file
File 'kbproto.pc' appears to be a .pc file
Will find package 'kbproto' in file '/usr/share/pkgconfig/kbproto.pc'
File 'bigreqsproto.pc' appears to be a .pc file
Will find package 'bigreqsproto' in file '/usr/share/pkgconfig/bigreqsproto.pc'
File 'adwaita-icon-theme.pc' appears to be a .pc file
Will find package 'adwaita-icon-theme' in file '/usr/share/pkgconfig/adwaita-icon-theme.pc'
File 'windowswmproto.pc' appears to be a .pc file
Will find package 'windowswmproto' in file '/usr/share/pkgconfig/windowswmproto.pc'
File 'damageproto.pc' appears to be a .pc file
Will find package 'damageproto' in file '/usr/share/pkgconfig/damageproto.pc'
File 'glproto.pc' appears to be a .pc file
Will find package 'glproto' in file '/usr/share/pkgconfig/glproto.pc'
File 'dri2proto.pc' appears to be a .pc file
Will find package 'dri2proto' in file '/usr/share/pkgconfig/dri2proto.pc'
Ignoring file '.' in search directory; not a .pc file
File 'dri3proto.pc' appears to be a .pc file
Will find package 'dri3proto' in file '/usr/share/pkgconfig/dri3proto.pc'
File 'dmxproto.pc' appears to be a .pc file
Will find package 'dmxproto' in file '/usr/share/pkgconfig/dmxproto.pc'
File 'xcmiscproto.pc' appears to be a .pc file
Will find package 'xcmiscproto' in file '/usr/share/pkgconfig/xcmiscproto.pc'
File 'fixesproto.pc' appears to be a .pc file
Will find package 'fixesproto' in file '/usr/share/pkgconfig/fixesproto.pc'
File 'inputproto.pc' appears to be a .pc file
Will find package 'inputproto' in file '/usr/share/pkgconfig/inputproto.pc'
File 'xf86driproto.pc' appears to be a .pc file
Will find package 'xf86driproto' in file '/usr/share/pkgconfig/xf86driproto.pc'
File 'recordproto.pc' appears to be a .pc file
Will find package 'recordproto' in file '/usr/share/pkgconfig/recordproto.pc'
File 'xkeyboard-config.pc' appears to be a .pc file
Will find package 'xkeyboard-config' in file '/usr/share/pkgconfig/xkeyboard-config.pc'
File 'systemd.pc' appears to be a .pc file
Will find package 'systemd' in file '/usr/share/pkgconfig/systemd.pc'
File 'presentproto.pc' appears to be a .pc file
Will find package 'presentproto' in file '/usr/share/pkgconfig/presentproto.pc'
File 'xf86dgaproto.pc' appears to be a .pc file
Will find package 'xf86dgaproto' in file '/usr/share/pkgconfig/xf86dgaproto.pc'
File 'renderproto.pc' appears to be a .pc file
Will find package 'renderproto' in file '/usr/share/pkgconfig/renderproto.pc'
File 'xf86vidmodeproto.pc' appears to be a .pc file
Will find package 'xf86vidmodeproto' in file '/usr/share/pkgconfig/xf86vidmodeproto.pc'
File 'randrproto.pc' appears to be a .pc file
Will find package 'randrproto' in file '/usr/share/pkgconfig/randrproto.pc'
File 'scrnsaverproto.pc' appears to be a .pc file
Will find package 'scrnsaverproto' in file '/usr/share/pkgconfig/scrnsaverproto.pc'
File 'compositeproto.pc' appears to be a .pc file
Will find package 'compositeproto' in file '/usr/share/pkgconfig/compositeproto.pc'
File 'xineramaproto.pc' appears to be a .pc file
Will find package 'xineramaproto' in file '/usr/share/pkgconfig/xineramaproto.pc'
File 'xtrans.pc' appears to be a .pc file
Will find package 'xtrans' in file '/usr/share/pkgconfig/xtrans.pc'
File 'resourceproto.pc' appears to be a .pc file
Will find package 'resourceproto' in file '/usr/share/pkgconfig/resourceproto.pc'
File 'xextproto.pc' appears to be a .pc file
Will find package 'xextproto' in file '/usr/share/pkgconfig/xextproto.pc'
File 'udev.pc' appears to be a .pc file
Will find package 'udev' in file '/usr/share/pkgconfig/udev.pc'
File 'xf86bigfontproto.pc' appears to be a .pc file
Will find package 'xf86bigfontproto' in file '/usr/share/pkgconfig/xf86bigfontproto.pc'
Looking for package 'libmongocrypt'
Looking for package 'libmongocrypt-uninstalled'
Reading 'libmongocrypt' from file '/usr/lib/x86_64-linux-gnu/pkgconfig/libmongocrypt.pc'
Parsing package file '/usr/lib/x86_64-linux-gnu/pkgconfig/libmongocrypt.pc'
  line>Name: mongocrypt
  line>Description: The libmongocrypt client-side field level encryption library.
  line>Version: 1.2.1
  line>Requires: libbson-static-1.0
  line>Requires.private: 
  line>prefix=/usr
 Variable declaration, 'prefix' has value '/usr'
  line>includedir=${prefix}/include/mongocrypt
 Variable declaration, 'includedir' has value '/usr/include/mongocrypt'
  line>libdir=${prefix}/lib/x86_64-linux-gnu
 Variable declaration, 'libdir' has value '/usr/lib/x86_64-linux-gnu'
  line>Libs: -L${libdir} -lmongocrypt
  line>Cflags: -I${includedir}
Path position of 'libmongocrypt' is 4
Adding 'libmongocrypt' to list of known packages
Searching for 'libmongocrypt' requirement 'libbson-static-1.0'
Looking for package 'libbson-static-1.0'
Looking for package 'libbson-static-1.0-uninstalled'
Package libbson-static-1.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libbson-static-1.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libbson-static-1.0', required by 'libmongocrypt', not found

Welcome to the MongoDB Community Forums @Sonu_Sharma !

Can you please provide more context on the output provided:

  • What driver & version are you trying to install?
  • What command line are you running to produce this output?
  • What is your O/S and version?

Thanks,
Stennie

  • What driver & version are you trying to install?
    I am installing libmongocrypt . As one of the dependency for Client side field encryption on linux debian buster. using the following commands

    sudo sh -c ‘curl -s https://www.mongodb.org/static/pgp/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg’

    echo “deb https://libmongocrypt.s3.amazonaws.com/apt/debian buster/libmongocrypt/1.0 main” | sudo tee /etc/apt/sources.list.d/libmongocrypt.list

    sudo apt-get update

    sudo apt-get install -y libmongocrypt-dev

  • What command line are you running to produce this output?
    It installs successfully but after running the cmd pkg-config --debug --cflags --libs libmongocrypt it gives the following error

  • What is your O/S and version?
    cat /proc/version
    Linux version 4.19.0-17-cloud-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.194-1 (2021-06-10)

Hi @Sonu_Sharma,

The question about the driver/version is referring to which of the MongoDB official libraries are you planning to use ? i.e. programming language: Node.JS, Go, .NET/C#, etc

This is because only some of the MongoDB drivers require specific integration steps to install or link to libmongocrypt as a separate dependency; while some have already bundled with libmongocrypt.

Each of the driver documentation should have more complete information relating to libmongocrypt.

It looks like you have followed the installation instructions from:

Assuming that the driver that you are using does require you to install libmongocrypt separately, based on the error log you provided it seems that you’re missing libbson. If so, please see Install libbson with a Package Manager.

For additional references about the relationships between the drivers and each of CSFLE encryption component please see Encryption Components

Regards,
Wan.

1 Like

I installed libbson using sudo apt-get install libbson-1.0-0
got the following response
Reading package lists… Done
Building dependency tree
Reading state information… Done
libbson-1.0-0 is already the newest version (1.14.0-1).
The following package was automatically installed and is no longer required:
libsnappy1v5
Use ‘sudo apt autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded.

I am using https://github.com/mongodb/mongo-go-driver

Still same error as mentioned earlier i have installed libbson , lybmongocrypt.

@Sonu_Sharma thanks for identifying and reporting this issue. I have created MONGOCRYPT-330 to track the resolution of this issue. You can add yourself as a watcher of that ticket if you wish to be updated as its status changes.

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.