I want to install libgflags-dev. According to this launchpad link, it is present in the ubuntu repositories : https://launchpad.net/ubuntu/+source/gflags and http://packages.ubuntu.com/raring/libdevel/libgflags-dev
But when i try to sudo apt-get install it, I get E: Unable to locate package libgflags-dev
Why is this happening ? I have all multiverse and universe enabled from software center.
How to install it from apt-get ?
P.S. I know i can simply download the binary and make install it, but I want to know how to do this from apt-get.
Not packaged for Precise
As you can see on the
packages.ubuntu.com
site with a query, this isn't available in Precise (12.04), but only for Quantal (12.10) and newer.Rather than installing from source, here's how to build your own package from the sources of Quantal.
Manual package build (backport)
This is a very very verbose description - for anyone building a package for the first time.
Install basic packages to build software and packages: build-essential and devscripts .
Go to the source package (
gflags
) page at Launchpad: https://launchpad.net/ubuntu/+source/gflagsUnfold the section for "The Quantal Quetzal (supported) 2.0-1" version.
Locate the source package description file (
.dsc
extension). At the time of writing this is https://launchpad.net/ubuntu/+archive/primary/+files/gflags_2.0-1.dscCopy the link to your clipboard.
Open a terminal and download the source package using
dget
:This will fail the first time:
Install the required RSA key as in the error message above:
Configure the DPKG development scripts to use your GPG keyring:
See Added key, but dget still shows "gpg: Can't check signature: public key not found" for why.
Run the earlier
dget
command again. This should now succeed.Hop into the directory created:
Try building the package.
Explanation for the options: unsigned changes file, unsigned new
.dsc
file. As you are not redistributing the package, there's no need to sign anything.This may fail due to missing build dependencies, e.g.:
Note this is really system specific.
Install the build dependencies (satisfy all above from the output you get), e.g.:
Try building the package again:
One directory below, you'll find your packages, e.g.:
Install them:
In case this fails because of binary dependencies not satisfied, run
Done!
You can remove or update them any time, like any other package.
The next time you will build any package you will not have to go through all the hoops... in general the recipe is like:
dget <.dsc-file>
cd thefolder
debuild -uc -us
sudo dpkg -i ../*somepattern*.deb
As can be seen in the launchpad page, gflags have a unofficial PPA that provides perbuild binaries for precise. I've used ppa:fcitx-team/nightly and it looks to be working fine.