This is a text-only version of the following page on https://raymii.org:
Title : Installing PyGopherd on Ubuntu 20.04
Author : Remy van Elst
Date : 04-07-2020
URL : https://raymii.org/s/tutorials/Installing_PyGopherd_on_Ubuntu_20.04.html
Format : Markdown/HTML
Ubuntu 20.04 dropped the Pygopherd package. There is no way to install it from
the official repositories. In this guide I'll show you two ways to install the
version from Ubuntu 18.04, which still works perfectly on 20.04. Either via
just downloading the 2 deb packages, or via `apt pinning` from the previous
repository. Ubuntu removed the package [as seen here] because it's not
in the current debian development release, due to debian removing all python 2
packages and their dependencies. IMHO that's stupid, but that is a discussion
for another time. The author of Pygopherd in the [bug report says he is
working on a python 3 port], but as of now it's not in 20.04.
Here is a screenshot of the [Castor] browser showing my Ubuntu 20.04 server
serving gopher pages via pygopherd:
Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics.
Please, if you found this content useful, consider a small donation using any of the options below:
://leafnode.nl">I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go che
ck it out!
Consider sponsoring me on Github. It means the world to
me if you show your appreciation and you'll help pay the server costs.
ode=7435ae6b8212">You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60
Pygopherd is a gopher server written in python, as the name suggests. I use it
to provide this [website over gopher] as well as over http. I've even written
[a log analyzer to get some statistics] for pygopherd. Gopher is a protocol
predating 'the web', a simple document (mostly text only) oriented protocol, which
has seen a resurgence as of the last years because people are not happy with the
current state of 'the web'. See also [Gemini].
I recently came across [Castor], a graphical client for Gopher and Gemini,
for Linux, Windows and Mac OS X. Lynx is nice, but new shiny stuff is also fun
to play with.
### .deb packages
The easiest one off way is to just grab the `.deb` packages from Ubuntu 18.04,
both [pygopherd] and [python-simpletal]. Download the files from the
two links to your server and use the following command to install them:
dpkg -i python-simpletal*.deb
dpkg -i pygopherd*.deb
You might also need python2:
apt install python2
apt -f install
Start the server up and you're ready to go on port 70:
systemctl enable pygopherd
systemctl restart pygopherd
Since it's just two packages without complicated dependencies this route is fine.
If you want to use apt and also receive updates to this package, you might want
to consider the next method (pinning).
### apt pinning
Apt (the package manager) provides a way to handle multiple repositories that
provide the same packages, named pinning. You add all the repositories, the one
for the current ubuntu version is the default with the highest priority (all
the packages will come from there by default), and all the packages you want
from other repositories you add to a configuration file.
Lets gets started. Add the Ubuntu 18.04 repositories to your 20.04 `sources.list`:
Choose a mirror you like, I used this one close to me. Both our packages are
in `universe`, therefore I just add that, not the rest of the repo's:
deb http://ams3.clouds.archive.ubuntu.com/ubuntu/ bionic universe
deb http://ams3.clouds.archive.ubuntu.com/ubuntu/ bionic-updates universe
**Do not apt update yet!**.
Add a preferences file in which we tell apt to only install pygopherd from
this older repository:
Add the following:
Pin: release n=focal
Pin: release n=bionic
The topmost block tells apt to use the default 20.04 (focal) repositories for all
packages, the last blocks tell apt to use the older repository for our specific
Check that the system does not know about pygoherd yet:
apt-cache policy pygopherd
N: Unable to locate package pygopherd
You can now update the apt cache:
Afterwards, check that apt now knows about it in the repo:
apt-cache policy pygopherd
500 http://ams3.clouds.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
You can now use apt to install pygopherd:
apt install pygopherd
The python dependency will be installed as well:
The following NEW packages will be installed:
Thats all there is to this method. The advantage is that you use the package
manager for everything and also receive updates if they ever arrive.
All the text on this website is free as in freedom unless stated otherwise.
This means you can use it in any way you want, you can copy it, change it
the way you like and republish it, as long as you release the (modified)
content under the same license to give others the same freedoms you've got
and place my name and a link to this site with the article as source.
This site uses Google Analytics for statistics and Google Adwords for
advertisements. You are tracked and Google knows everything about you.
Use an adblocker like ublock-origin if you don't want it.
All the code on this website is licensed under the GNU GPL v3 license
unless already licensed under a license which does not allows this form
of licensing or if another license is stated on that page / in that software:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
Just to be clear, the information on this website is for meant for educational
purposes and you use it at your own risk. I do not take responsibility if you
screw something up. Use common sense, do not 'rm -rf /' as root for example.
If you have any questions then do not hesitate to contact me.
See https://raymii.org/s/static/About.html for details.