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

migrated from programmers.stackexchange.com Jun 1 '16 at 10:46

This question came from our site for professionals, academics, and students working within the systems development life cycle.

  • E: stands for Error:. Nothing to do with Windows. – Helio Jun 1 '16 at 10:50
  • gtest does not exist. Maybe you mean libgtest-dev and libgflags-dev – Helio Jun 1 '16 at 10:53
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy