Thursday, April 24, 2014

Recover Ubuntu from perl catastrophe

In a clueless blind attempt to fix a small perl issue.  I ended up removing the entire module library for perl.  Not my smartest move.  This broke aptitude so that I could not successfully reinstall perl-base anymore.

I downloaded the original package from an ubuntu mirror with the following command:

wget http://mirrors.kernel.org/ubuntu/pool/main/p/perl/perl-base_5.18.2-2ubuntu1_amd64.deb

then for the install

sudo dpkg -i perl-base_5.18.2-2ubuntu1_amd64.deb  

After that I could finally apt-get update without error.  Some other commands are having issues because they reference modules that currently don't exist.  I applied the same logic to the other perl modules by finding the ubuntu package that contains them.

The next package was doc-base but that depends on libuuid-perl, so complete the same steps as above but with this mirror instead:

wget http://mirrors.kernel.org/ubuntu/pool/main/libu/libuuid-perl/libuuid-perl_0.05-1_amd64.deb

Also, libyaml-tiny-perl

wget http://mirrors.kernel.org/ubuntu/pool/main/liby/libyaml-tiny-perl/libyaml-tiny-perl_1.56-1_all.deb

Then for doc-base:

wget http://mirrors.kernel.org/ubuntu/pool/main/d/doc-base/doc-base_0.10.5_all.deb

... dpkg -i all of these downloaded files.

As you start running programs and get errors such as

Can't locate Debian/AdduserCommon.pm in @INC (you may need to install the Debian::AdduserCommon module)

in my case, apt-file search the AdduserCommon.pm file and reinstall that package


If you find yourself apt-getting without errors you can execute apt-get --reinstall install *package name* instead of downloading the file the dpkg -i the package.

Tuesday, April 1, 2014

Fastest DNS server for your area

I have noticed a vast improvement after running this tool called namebench.  It really does a great job of finding the DNS servers with the best performance for your area.

you can find this tool here: https://code.google.com/p/namebench/

After running this, I have found that using opendns' 208.67.220.222 server is 23.6% faster than my old google 8.8.8.8 server.

If you are wondering how you can change my dns routing, get openwrt.  I have a post on that outlining openwrt on mr3020.  Your router will most likely not be a tp-link mr3020 but roughly the same instructions apply.  I advise you visit openwrt's website for more info: https://openwrt.org/

As usual, hats off to the developers of namebench and openwrt.  This would not be possible without you.