Adding DNS Server to Lubuntu 12.04 with Webmin

I’m trying to set up my Lubuntu box as a test server for some web development (PHP) work and have decided this means running a DNS server so I can set up my own domain names (site1.local, site2.local etc).

A quick Google suggests installing and configuring a DNS server manually could be painful, and it looks as though the simplest way to do this would be to use Webmin*, a web based interface for administering Unix-like systems.

Unfortunately when I followed the Webmin install instructions I got an error telling me that:

W: Failed to fetch http://webmin.mirror.somersettechsolutions.co.uk/repository/dists/sarge/Release Unable to find expected entry ‘contrib/source/Sources’ in Release file (Wrong sources.list entry or malformed file)

W: Failed to fetch http://download.webmin.com/download/repository/dists/sarge/Release Unable to find expected entry ‘contrib/source/Sources’ in Release file (Wrong sources.list entry or malformed file)

Looking at the messages you can see it is failing to find some files called “sources”, which explains why the solution I found at SuperUser worked.  Just tell apt-get to stop looking for sources!  When you add the repositories in the install instructions, it looks like Linux is adding the corresponding source repositories, when all we really want are the binaries to run the program.  So you can either manually edit /etc/apt/sources.lst and comment out the offending lines (which should be at the end of the file and prefixed with deb-src) – or you can use Ubuntu’s “Software Sources” utility and just remove them.

Now you can run apt-get install webmin again and it should be fine.

* Actually, the simplest way is probably to just edit the HOSTS file on my laptop(s) as I’ve done previously, but I’m trying to do this in some way ‘right’.

Author: nerd.

An experienced IT professional, I used to run a number of small websites and spend a lot of time tinkering with my sites or my PC - back when I had free time.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.