Upgrading node and yarn

Problem

You are getting the following error when trying to use yarn:

SHELL

Solution

Upgrade yarn

SHELL

Which should give the updated yarn version:

SHELL

Upgrade node version with the correct version from above (ie 10.0.0)

HTML

And then the needed versions would have been installed:

SHELL

Raspberry, Ubuntu and Megatools

To install megtools (command line utilities for Mega.nz), in your raspberry with ubuntu installed follow the steps below (thanks to the instructions from here: https://www.instructables.com/id/Descarga-archivos-de-Mega-con-Raspberry-Pi/)

  • Install the necessary packages
SHELL<br>

You may also need to add some additional packages if there is an error about the documentation.

  • Get the latest source code from https://megatools.megous.com
SHELL
  • Compile and install them
SHELL<br>
  • Add your Mega account credentials in ~/.megarc like:
SHELL<br>
  • use the mega tools commands (megacopy, megals, megaget etc.

Erlang and Elixir with asdf in Raspberry 4 with Ubuntu 20.04

To install the latest/current versions of erlang (23.0.2) and elixir (1.10.3), follow the instructions below:

Install asdf ( full instructions https://asdf-vm.com/#/core-manage-asdf-vm):

SHELL

Add the following two lines in your ~/.bashrc file:

SHELL

Reload/Source your bash file with

SHELL

Install the erlang plugin

SHELL

If you get the following warnings:

SHELL

Install the missing packages:

SHELL

Install latest erlang version:

SHELL

Set it up globally (if you want):

SHELL

Add elixir plugin:

SHELL

Install latest elixir version (1.10.3):

SHELL

Set it up globally:

SHELL

Finally you can also install the latest Phoenix version (1.5.3):

SHELL

WiFi, Raspberry Pi 4 B, Ubuntu 20.04

After installing an image of the Ubuntu server on the Raspberry 4, the wifi is not automatically configured after the initial book.

In order to be able to use the WiFi follow the steps described below for setting up your wifi in your SD card, and then reboot your raspberry (make sure that the indentation in the yaml file is correct, and also your WiFi access point is enclosed in quotes):

https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi#3-wifi-or-ethernet

Errors were encountered while processing: linux-image-3.13.0-128-generic

Problem

You are trying to install/remove a package but you always get an error message about linux message as above:

Errors were encountered while processing:
 linux-image-3.13.0-128-generic

Solution

Try the following:

rm -rf /var/lib/dpkg/info/linux-image-3.13.0-128-generic.*
apt-get purge linux-image-3.13.0-128-generic

Docker – Debian – Kernel panick – Automatic restart

Problem

You have a remote server (Debian) running some Docker containers and you want to make sure that they all restart in the event of a kernel panick.

solution

  • Add an automatic restart after a kernel panick by running:
    sysctl kernel.panic=20
  • Emulate a kernel panick by running the following (SysRq more info here :
    echo c > /proc/sysrq-trigger
  • Check that the containers have restarted again with docker ps (NOTE: the containers should have been enabled to autorestart)