Yes, the name server update does work and if it does work then you've probably updated your IP settings to be static and your server can no longer resolve URLs.
Try the above and if it works, reboot. If it fails after rebooting, then do this:
Edit the template file for the resolv.conf
. Ubuntu server rebuilds this every boot.
sudo vi /etc/resolvconf/resolv.conf.d/tail
#add just these two lines >>
nameserver 8.8.8.8
nameserver 8.8.4.4
Then save the file and restart the service:
sudo /etc/init.d/resolvconf restart
8.8.8.8
and 8.8.4.4
are just Google's Name Servers. You should be able to add in your own ISP's if you want. If you don't like vi
, use nano
or vim
.
I figured it out reading this article. So credit to them for the tip.
No, it will not be possible. apt-get
works with the repositories that are defined in sources.list
, as the software center does.
You'll find this kind of "layered" systems in many places in linux. To illustrate this, let's look at how an application is installed "low level". To install an application, several (in most cases, many) applications need to be copied to several (or many) different directories. The executable file needs to go to one directory, some libraries need to go to another directory, some manuals (man pages) need to go to yet another directory, some icons need to go to still another directory, and so forth. When you want to deinstall the application later, you'd have to "tidy up" all those files in all those different places.
To make this easier, there's the package manager dpkg
. A deb package (named this because it was originally developed for Debian, which Ubuntu is based on) is, more or less, an archive that contains files with the information where those files should go. When you install a package, the files are copied to the appropriate places; when you deinstall it, the files are removed. To do this, the "usual", low level tools like for example tar
are used. This illustrates the concept: dpkg
uses what is already there to simplify a task.
Additionally, a package mostly has dependencies. A package can say, "if you want to install me, you need to install this other package as well, because it contains files I need". Or, "if you want to install me, you can't install this other package, because our files would conflict". Again, there's an additional layer on top of "copy some files to the right directories", that uses what's already there.
The next question would be, where do I get those packages? This is where the next layer comes in, the apt tools (apt-get
, apt-cache
and so on). With apt, you can manage package sources, so called repositories, where it can automatically fetch packages. A repository can be on a server somewhere in the net, on a CD or DVD, on your local hard disk and so forth. Which repositories are available is defined in sources.list
. From these repositories, the apt tools build a cache, which is essentially a list of the packages that are available from the repositories.
So if you install a package with apt-get
, it is fetched from the respective repository and handed to dpkg
. dpkg
, in turn, installs the package like described above, with tools like tar
.
In the next layer, there are GUI tools like Synaptic or the software center. They offer the possibility to manage your packages with a graphical interface instead of "only" on the command line. The GUI tools "under the hood" hand the work over to the apt tools, which (as described) use dpkg
, which uses tools like tar
. So, apt-get
can't possibly know about any repositories the software center doesn't know about. In fact, it's the other way around: The software center works "on top" of apt's cache, so it can only know about the repositories that are defined in sources.list
.
The description above can of course only be an outline, with many details and additional features of the respective layers omitted. For example, there's the sources.list.d
directory in which additional repositories can be defined. They, of course, apply to the apt tools as well to GUI tools like the software center. Another example, the software center not only offers to manage your packages with a graphical interface, but offers the possibility to sell and buy packages as well.
Best Answer
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