linux – 在ubuntu中使用gflags库

我在安装gflags时遇到问题.如果我使用(https://github.com/gflags/gflags/blob/master/INSTALL.md)中写的apt-get,我会收到以下错误

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

我该如何安装gflags?

解决方法:

在Ubuntu或Debian机器上你可以得到相关的包做这样的事情:

$apt-cache search gflags

在我的机器上输出(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

所以,我认为您可以使用它的全名安装它,如下所示:

$sudo apt-get install libgflags2 libgflags-dev
上一篇:对‘google::FlagRegisterer::FlagRegisterer<unsigned long>(char const*, char const*, )’未定义的引用


下一篇:linux下gflags的安装