Problem
You would like to have a list of all the services (running and stopped) in a debian system.
Solution
You can run the following to see the list of services:
service --status-all
Problem
You would like to have a list of all the services (running and stopped) in a debian system.
Solution
You can run the following to see the list of services:
service --status-all
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
Problem
You would like to know the codename (release) name of your Debian/Ubuntu system. Running cat /etc/issue will give you the release version but not the number.
Solution
Run the following command to get your release name:
lsb_release -cs
Problem
When you are trying to install a package inside a debian Docker container you get the following error message:
FATAL -> Failed to fork.
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:
fallocate -l 4G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile echo "/swapfile swap swap sw 0 0" >> /etc/fstab
(Thanks Valent)
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
sysctl kernel.panic=20
echo c > /proc/sysrq-trigger
Problem
You want to install some default locales in a Docker image, and the suggestion is to use locale-gen to do so, but it does not work as expected.
Solution
In order to be able to use the locale-gen and install the locales you need you will have to uncomment the ones needed from /etc/locale.gen first and then use the locale-gen. Example below:
## Set up locales ## Uncomment the ones we need as locale-gen does not work without that RUN sed -i '/en_US.UTF-8/s/^#//' /etc/locale.gen RUN sed -i '/de_DE.UTF-8/s/^#//' /etc/locale.gen ## Now install them and set the default one RUN locale-gen ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8
Problem
When trying to connect with ssh to a linux (debian- ubuntu) server you get the following error:
bash: warning: setlocale: LC_ALL: cannot change locale (en_GB.UTF-8)
Solution
The reason is that the server is missing the en_US locale that your client is trying to use to connect to the server.
Login to the server and by using sudo (or su) run the following to install the missing en_US locale and make sure that you leave default to ‘None’ as described here:
dpkg-reconfigure locales
Problem
You would like to (re)-install passenger after a system wide rvm installation, but you only have the mod_passenger.c file and not the .so after the gem installation.
Solution
Make sure that after using gem install passenger you also use the command to install the apache2 passenger module:
passenger-install-apache2-module
you should then be able to see the .so file and add it to your /etc/apache2/mods-available/passenger.load
Problem
You want to use the rmagick gem in your ruby on rails project, but you need to install the imagemagick first.
Solution
If Imagemagick is not already installed, use the following to install it:
$ sudo apt-get install imagemagick
$ sudo apt get install libmagick-dev libmagickwand-dev
You should then be able to install and use the rmagick gem
Problem
You are trying to set up gitolite access through gitweb but the gitweb page, shows ‘no projects avaiable’ even though you have repositories available.
Solution
Try to follow the guide here.
Some of tthe most important steps for having the right access permissions are:
$ sudo usermod -a -G gitolite www-data
$ sudo vi /etc/gitweb.conf
$projectroot ="/var/lib/gitolite/repositories";
$projects_list="/var/lib/gitolite/projects.list";
$ sudo chmod g+r /var/lib/gitolite/projects.list
$ sudo chmod -R g+rx /var/lib/gitolite/repositories
$REPO_UMASK = 0027;
exec chpst -ugitdaemon:gitolite