Debian
Table of Contents
- Introduction
- Enable multiarch repository
- Enable add-apt-repository
- Use ISO file as offline repository
- APT Errors
Introduction
Debian OS is excellent to use for system that requires little maintenance. All that is needed is to update the security patch regularly.
Enable multiarch repository
Most modern PC uses 64-bit architecture. Some packages (ie. Steam) requires 32-bit library.
So we need to enable multiarch feature.
Enable 32-bit repository.
dpkg --add-architecture i386
List other arch.
dpkg --print-foreign-architectures
Enable add-apt-repository
Whilst using debian, sometime we need to use Ubuntu PPA. The easiest way to do is by doing this. Be warned that not every PPA works well Debian.
- Install
software-properties-common.apt install software-properties-common - Add repository using
add-apt-repository.add-apt-repository ppa:<PPA Name>
Use ISO file as offline repository
This is useful when installing Debian Lite because network-manager is not installed by default. We need DVD Debian Installer to use as the apt source. Follow these steps.
- Create an empty folder.
mkdir -p /home/<username>/apt-source - Mount ISO file to the newly created folder.
mount -o loop {file.iso} /home/<username>/apt-source - Add entry to
/etc/apt/sources.list.deb [trusted=yes] file:///home/<username>/apt-source/ stable main - Update repository on your PC.
apt update1.
sources.listfile only support absolute filepath.
2. You might need to editstableto the OS name.
APT Errors
Using offline or ISO repository sometime throws error like this.
A Check-Valid-Until is a yes/no value which controls if APT should try to detect replay attacks. However, some repositories such as historic archives are not updated any more by design, so this check can be disabled by setting this option to false.
apt -o Acquire::Check-Valid-Until=false update