Using gflags library in ubuntu
Asked Answered
R

1

9

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?

Rowena answered 4/6, 2015 at 16:14 Comment(0)
U
14

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
Unsociable answered 4/6, 2015 at 17:7 Comment(3)
Thanks. Do I need to add compilation flag when I am compiling a gflag program?Rowena
Using make, CMake, ... or compiling something "by hand"? In general, yes. At least for linkage step.Unsociable
At least for Ubuntu 16.04, all that is needed is $ sudo apt-get install libgflags-dev as this also will pull in the libgflags2 dependency automatically.Fratricide

© 2022 - 2024 — McMap. All rights reserved.