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:

Solution

Try the following:

Use tee command to send output to a file and email

Problem

You would like to send the error output from a command or a script to both an error file and an email.

Solution

By using tee, you could do the following:

Bash script using default value for empty parameter

Problem

You have a bash script that accepts parameter(s) but you want to give a default value for a missing parameter.

Solution

For example you have a script that accepts a parameter with the year and month (ie 201703), but you want to give it a default of two months ago if the parameter is missing.

Bash script to add environment and date in Symfony appversion.yml file

Problem

You are using CI/CD to deploy a Symfony application that has the appversion.yml configuration file, and you want to add the environment and a timestamp to it after deployment.

Solution

You can achieve this by creating and running a bash script like the following and passing the environment as a variable (ie script_name env) :

Error installing json 1.8.3 with ruby 2.4

Problem

You are trying to install the gems for your rails application in a new computer, or by using ruby 2.4 and you get the following error:

Solution

Remove your old Gemfile.lock file and run bundle again. A newer version of json (ie 1.8.6) should be installed.

FATAL -> Failed to fork – Digital Ocean – Debian – Docker

Problem

When you are trying to install a package inside a debian Docker container you get the following error message:

Solution

This is an indication of ‘out of memory’ so add a swap partition if it does not exist, on the host with the following:

(Thanks Valent)