Using gflags library in ubuntu

ekhan picture ekhan · Jun 4, 2015 · Viewed 17.9k times · Source

I am having problem installing gflags. If I use apt-get as written in (https://github.com/gflags/gflags/blob/master/INSTALL.md) I get the following error

sudo apt-get install gflags
Reading package lists... Done
Building dependency tree        
Reading state information... Done
E: Unable to locate package gflags

How can I install gflags?

Answer

Kamiccolo picture Kamiccolo · Jun 4, 2015

On Ubuntu or Debian machine You can get related packages doing something like this:

$ apt-cache search gflags

Output on my machine (Ubuntu 14.04):

libgflags-dev - commandline flags module for C++ (development files)

libgflags-doc - documentation of gflags

libgflags2 - commandline flags module for C++ (shared library)

python-gflags - Python implementation of the Google command line flags module

python-google-apputils - Google Application Utilities for Python

So, I presume You could install it using it's full name like this:

$ sudo apt-get install libgflags2 libgflags-dev