1

I am attempting to make some installations on the Ubunto VirtualBox, running in a Windows XP host. The installation seems to work, I can successfully install programs using

sudo apt-get install XXX

However, when I try to install something like gtest or gflags, I receive message (building dependency and reading state was still OK)

E: Unable to locate package gtest

Any idea? (BTW: this E: refers to my Windows drive of is is for Error:?)

https://github.com/gflags/gflags/blob/master/INSTALL.md

states that

For example on Debian/Ubuntu Linux, gflags can be installed using the following command:

sudo apt-get install gflags

2
  • E: stands for Error:. Nothing to do with Windows.
    – 0x2b3bfa0
    Commented Jun 1, 2016 at 10:50
  • gtest does not exist. Maybe you mean libgtest-dev and libgflags-dev
    – 0x2b3bfa0
    Commented Jun 1, 2016 at 10:53

2 Answers 2

0

When apt-get install is unable to locate a package, the package you want to install couldn't be found within repositories that you have added (those in in /etc/apt/sources.list and under /etc/apt/sources.list.d/).

On Ubuntu 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
0

This has nothing to do with VirtualBox -- it's the same whether Ubuntu is running on metal or on a VM.

You can see what packages are available using:

$ apt-cache search gtest

I get the response:

$ apt-cache search gflags
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

Then you can apt-get install ... the appropriate package.

You must log in to answer this question.