This page is the continuation of several blog posts related to Debian

Installing Debian

The Debian GNU Linux operating system is available as a torent download or a http download at debian.org/CD:

  • The net install CD is sufficient to install debian
  • On debian.org/CD/live/ you can get “Live images which you can use to try Debian first and then install the contents of the image.”

Verify the checksum

shasum debian-10.1.0-amd64-netinst.iso

To copy the image to a usb key follow the instruction on how to copy the iso image to a usb key

Find the device name of my USB key (it had a previous Debian system on it):

sudo fdisk -l
# /dev/sdb1 

Unmount the USB key

sudo umount /dev/sdb1
# or
sudo umount "/media/gabriele/Debian Inst"

Transfer the iso image to the key

sudo cp debian-live-9.5.0-amd64-gnome.iso /dev/sdb # or sudo cp debian-10.1.0-amd64-netinst.iso /dev/sdb

The iso should be copied to sdb and not to sdb1 ! Then the USB drive can be used to boot a laptop.

After the installation

Add my user name to the super user group

su
# Then as a super user 
/usr/sbin/adduser paul sudo

I updated the debian mirror to a nearby mirror

sudo apt edit-sources

Debian on a HP Elitbook

Note: on a HP laptop make sure that the “legacy boot” is enabled and that the “secure boot” is disabled. The boot devices can be choosen by pressing ESC at startup, then F9.

Debian installation went smoothly.

After the installation, there was one issue with the wifi card having a non-free driver. I had to place the package firmware-iwlwifi on a USB key. The download link is at the bottom of the page (all. Then installed it from the usb key with

sudo apt install ./firmware-iwlwifi_20161130-3_all.deb

Alternatively, the .ucode file can also be found in firmware-nonfree_20161130.orig.tar.xz And given directly during the installation step.

After that extra step, the wifi card was working inside Debian.

See also my 2014 blog post : Debian GNU Linux installation on a LENOVO T400

“BootDevice Not Found” issue in a HP Elitebook: Grub-EFI reinstall The issue happenned on a partitionned disk. The fix was to completely erase the main disk and to reinstall a new debian on a single partition.

Installing software

APT

For software in the repository, use

sudo apt install packagename

APT behind a proxy

Hash sum mismatch issue, fix bad proxy

sudo vim /etc/apt/apt.conf.d/99fixbadproxy

Enter:

Acquire::http::Pipeline-Depth 0;
Acquire::http::No-Cache true;
Acquire::BrokenProxy    true;

Now run the update command:

sudo apt update

How to set the proxy for APT I entered the proxy url in this apt configuration file:

vim /etc/apt/apt.conf.d/proxy.conf

In the following form (do not forget the semicolon at the end):

Acquire::http::Proxy "http://user:password@proxy.server:port/";

Installing debian software from backports:

 sudo apt -t stretch-backports install nodejs

DEB packages

For software in .deb packages, check the md5sum and install with

md5sum packagename.deb
sudo dpkg -i packagename.deb

or

sudo apt install ./packagename.deb

Stack overflow How to install a deb file, by dpkg -i or by apt? “When you use apt to install a package, under the hood it uses dpkg.”

If there are missingdependencies and you fix them you can retry the previsouly failed installed with: sudo dpkg –configure -a

Remove a package with:

sudo dpkg -r packagename

Anbox

Android in a box is an android emulator that runs on Linux. To install it on debian I added the contrib and non-free backports to /etc/apt/sources.list :

deb http://ftp.it.debian.org/debian stretch-backports main contrib non-free

Then installed anbox from the backports:

sudo apt -t stretch-backports install anbox

I have encountered issue 211

Lyx

wiki.lyx.org LyXOnDebian explains how to install Lyx on Debian:

sudo apt install lyx

Lyx couldn’t access some layout files, I first thought I needed install latex layouts:

sudo apt install texlive-latex-recommended
sudo apt install texlive-latex-extra

But these were already installed.

Default version of Lyx is 2.2 on debian strech. wiki.lyx.org LyXOnDebian explains how to install lyx 2.3 from the backports on Debian stretch.

sudo vim /etc/apt/sources.list
# Add deb http://ftp.debian.org/debian stretch-backports main 
# Or a mirror, for example
# deb http://ftp.it.debian.org/debian stretch-backports main
sudo apt update
sudo apt-get -t stretch-backports install lyx

Python

Install editor

pip3 install spyder

R and Rstudio

Installing R from the CRAN mirror

Install R from the CRAN repository, see Cran mirror of Debian packages

Add the following to /etc/apt/sources.list

deb https://cran.stat.unipd.it/bin/linux/debian stretch-cran35/
deb https://cran.stat.unipd.it/bin/linux/debian buster-cran35/

In case you get an error:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FCAE2A0E115C3D8A

Add the PGP key so that this server is trusted :

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 'FCAE2A0E115C3D8A'

Based on this stackoverflow answer about key server receive fail error I had to use a server providing a connection on port 80 because the default port is apparently blocked by a firewall on my network.

Then run the following to upgrade R to the lastest version availale on your CRAN mirror:

sudo apt update
sudo apt install r-base r-base-dev

Or if you already had an old R version on your system:

sudo apt upgrade 

Installing Rstudio

Download Rstudio for Debian

Run

dpkg -i rstudio-version-number.deb

Dependency error: rstudio depends on libclang-dev Install it

sudo apt install libclang-dev

Uninstall rstudio

sudo apt remove rstudio

Remmina

Installing from the backports (see above section on how to add the backports in sources.list)

sudo apt-get -t stretch-backports install remmina 

Riot

Desktop Riot installation

sudo apt install -y lsb-release wget apt-transport-https
sudo wget -O /usr/share/keyrings/riot-im-archive-keyring.gpg https://packages.riot.im/debian/riot-im-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/riot-im-archive-keyring.gpg] https://packages.riot.im/debian/ $(lsb_release -cs) main" |
    sudo tee /etc/apt/sources.list.d/riot-im.list
sudo apt update
sudo apt install riot-web

In an earlier version riot the source.list was mentionned directly in /etc/apt/sources.list. I needed to remove it as explained here:

“You have riot.im/packages in your apt sources list somewhere, which is the old repository location. You need to remove that”

Audio

Audio Setup

Audio Issues

“dummy output” issue. Seen on a Debian Forum one of the answer to Pulse Audio shows “dummy output” linked to that KDE PulseAudio page: KDE PulseAudio Integration “One thing that can happen is that some other process”hogs" the audio device during PulseAudio startup. When this happens PA is unable to use the device until it is restarted. If PA is unable to open your hardware, you will automatically be given a “Dummy Output”. As the name suggests, anything that is “Played” via this device is inaudible). This “Dummy Output” should be easily visible in both KMix and Phonon. If this happens, then you can debug which process is hogging the hardware via the command: sudo lsof /dev/snd/* /dev/dsp* (Note that apps which have the /dev/snd/control* devices open are unlikely to interfere)."

Debian wiki Missing playback devices or audio capture deleting the configuration files and restarting pulseaudio. The following commands restored audio:

$ rm -r ~/.config/pulse /tmp/pulse-*
$ pulseaudio --kill
$ pulseaudio --start

Fonts

Some programs require fonts that are not installed by default. For example:

sudo apt install fonts-crosextra-carlito fonts-crosextra-caladea
sudo apt install fonts-deva-extra

List of missing fonts SubstitutingCalibriAndCambriaFonts

System information

Find out which Debian version is running

cat /etc/issue

Tools

These tools are not specific to Debian. I place them here because I use Debian as my main system. If a section gets too large it may get moved to another page in the future.

Gimp

The most important Gimp shortcuts are:

  • CTRL + B to open the tool Box
  • CTRL + L to open the Layers dialog

A list of Gimp Shortcuts

Upgrade Debian version

From Jessie 8 to Stretch 9

I followed the documentation on upgrades from Debian 8, Jessie

In bash store the output of apt-get install with many dependency issues in a text file

$ sudo apt-get -f install > aptgetfinstall.txt

Using R to extract all packages and try to remove them

R> bli <- readLines("aptgetfinstall;txt")
R> blil <- strsplit(grep("^ [[:alpha:]]", bli, value=TRUE),":")
R> pkgissues <- unlist(lapply(blil, "[[", 1))

The bash command to remove a package was

$ sudo dpkg --force-all -P <packagename>

Send this command for all packages

R> lapply(paste("sudo dpkg --force-all -P ", pkgissues),system)

From stretch 9 to buster 10

Edit the sources.list files to replace “stretch” by “buster”

sudo vim /etc/apt/sources.list
# in vim :%s/stretch/buster/g

Attention, I had another sources.list file under a subdirectory I had to comment the sources mention there as well, otherwise the system wouldn’t uprgade most packages.

sudo vim  /etc/apt/sources.list.d/base.list



sudo apt update
sudo apt upgrade
sudo apt dist-upgrade