If you are upgrading from older versions of LinkChecker you should also read the upgrading documentation stored in Upgrading.
Setup with pip¶
If pip is available, this command should install LinkChecker on
the local system:
pip3 install git+https://github.com/linkchecker/linkchecker.git
Setup for Windows¶
Python from the Microsoft Store does include pip, but installing within Windows Subsystem for Linux (WSL) is the preferred option: https://docs.microsoft.com/en-us/windows/python/beginners
Setup for macOS¶
Setup for GNU/Linux¶
On all major Linux distributions (Debian, Mandriva, Redhat, Suse, Ubuntu),
linkchecker package is available for installation. pip will be
available, often as a package e.g.
python3-pip, to install the latest
Manual setup for Unix systems¶
First, install the required software.
Python >= 3.6 from https://www.python.org/
Be sure to also have installed the included distutils module. On most distributions, the distutils module is included in an extra
Python requests package from https://pypi.org/project/requests/
Python Beautiful Soup package from https://pypi.org/project/beautifulsoup4/
Optional, for bash-completion: argcomplete Python module from https://pypi.org/project/argcomplete/
Optional, for displaying country codes: GeoIP from https://pypi.org/project/GeoIP/
Optional, used for Virus checking: ClamAv from https://www.clamav.net/
Optional, for GNOME proxy setting parsing: PyGObject and GIO. Best installed from your distribution e.g.
Note for developers: if you want to regenerate the po/linkchecker.pot template from the source files, you will need xgettext with Python support. This is available in gettext >= 0.12.
Now install the application.
Compile Python modules
python setup.py sdist --manifest-onlyto create the MANIFEST file. Run
python setup.py buildto compile the Python files. For help about the setup.py script options, run
python setup.py --help.
Installation as root
sudo python setup.py installto install LinkChecker.
Installation as a normal user
python setup.py install --home $HOME. Note that you have to adjust your PATH and PYTHONPATH environment variables, eg. by adding the commands
export PATH=$PATH:$HOME/binto your shell configuration file.
For more information look at the Modifying Python’s search path documentation.
LinkChecker is now installed. Have fun!
WSGI web interface¶
The included WSGI script can run LinkChecker with a nice graphical web interface. You can use and adjust the example HTML files in the lconline directory to run the script.
Note that running LinkChecker requires CPU and memory resources. Allowing a WSGI script to execute such a program for possibly a large number of users might deplete those resources. Be sure to only allow access from trusted sites to this script.
Copy the script lc.wsgi in the WSGI directory.
Adjust the “action=…” parameter in lconline/lc_cgi.html to point to your WSGI script.
If you use Apache, copy config/linkchecker.apache2.conf into your Apache configuration directory (eg. /etc/apache2/conf.d) and enable it.
Load the lconline/index.html file, enter an URL and click on the check button.
If something goes wrong, check the following:
look in the error log of your web server
be sure that you have enabled WSGI support in your web server, for example by installing mod_wsgi for Apache
be sure that you have enabled the negotiation and versioning modules for Apache: a2enmod version a2enmod negotiation