- Install Dart
- Update PATH
- Install Linkcheck
- Verify Linkcheck installation
- Next step: Usage of Linkcheck
This page provides instructions for the installation of Linkcheck for the Linux systems.
Install Dart
Linkcheck was developed using Google's Dart programming language. So, the first step in installing linkcheck is installation of Dart.
To install Dart on Debian/Ubuntu systems enter the following in a terminal:
sudo apt-get update;
sudo apt-get install dart
Note: If 'dart' is not found, you must first add the Dart repository to your system as described on the page for Dart."
Update PATH
Next, add the Dart bin directory to the $PATH variable:
export PATH="$PATH:~/.pub-cache/bin"
This command adds the location "$HOME/.pub-cache/bin" to the PATH in Linux. The $PATH variable contains a colon-separated list of directories that can be searched for a command. If the $PATH variable contains the location of the program, the user can run the program from any location within the OS without specifying the full path to the program. An address added to PATH by this command will be valid until the system is reset.
To make this change permanent, the addition to PATH should be included in Unix shell ~/.bashrc or ~/.zshrc file (see Linux shells). The file .bashrc is located in the HOME directory of the user. This is a system file, the name of which starts with a period. If the name .bashrc does not appear in the home directory listing, click ctrl-H to see the hidden files. (Further information about .bashrc file)
Open ~/.bashrc for editing:
nano ~/.bashrc
Append the following line at the end of the ~/.bashrc or ~/.zshrc file.
PATH="$PATH:~/.pub-cache/bin"
Save the file by typing ^O and then exit by ^X.
Install Linkcheck
To install Linkcheck using Dart, enter the following command.
dart pub global activate linkcheck
Verify Linkcheck installation
To verify that Linkcheck is correctly installed and accessible, type:
linkcheck --version