How to install/change locale on Debian?

Edit /etc/default/locale and set the contents to: LANG=”nl_NL.UTF-8″ You can check which locales you currently have generated using: locale -a You can generate more by editing /etc/locale.gen and uncommenting the lines for the locales that you want to enable. Then you can generate them by running the command: locale-gen You can find a list of … Read more

List of files installed from apt package

Note: in the following commands, a command beginning with ‘root#’ means it needs to be run as root. To find which files were installed by a package, use dpkg -L: $ dpkg -L $package apt-file can tell you which files will be installed by a package before installing it: root# apt-get install apt-file root# apt-file … Read more

How do I get apt-get to ignore some dependencies?

Simple and easy solution: just specify the unwanted packages with an extra – after each of them. Example without the – switch: root@debian:~# apt-get install bsd-mailx Reading package lists… Done Building dependency tree Reading state information… Done The following extra packages will be installed: exim4-base exim4-config exim4-daemon-light liblockfile-bin liblockfile1 […] Example using the switch to … Read more

What’s the best way of handling permissions for Apache 2’s user www-data in /var/www?

Attempting to expand on @Zoredache’s answer, as I give this a go myself: Create a new group (www-pub) and add the users to that group groupadd www-pub usermod -a -G www-pub usera ## must use -a to append to existing groups usermod -a -G www-pub userb groups usera ## display groups for user Change the … Read more

How can I run Debian stable but install some packages from testing?

Many people seem to be afraid of mixing stable with testing, but frankly, testing is fairly stable in its own right, and with proper preferences and solution checking, you can avoid the “stability drift” that puts your core packages on the unstable path. “Testing is fairly stable??”, you ask. Yes. In order for a package … Read more

Anyone else experiencing high rates of Linux server crashes during a leap second day?

This is caused by a livelock when ntpd calls adjtimex(2) to tell the kernel to insert a leap second. See lkml posting http://lkml.indiana.edu/hypermail/linux/kernel/1203.1/04598.html Red Hat should also be updating their KB article as well. https://access.redhat.com/knowledge/articles/15145 UPDATE: Red Hat has a second KB article just for this issue here: https://access.redhat.com/knowledge/solutions/154713 – the previous article is for … Read more

python-dev installation error: ImportError: No module named apt_pkg

I met this problem when doing sudo apt-get update. My env is debian8, with python2.7 + 3.4(default) + 3.5. The following code will only re-create a apt_pkg….so file for python 3.5 The following code solved my problem, Replace {your-version-number} appropriately. CAUTION, the following will create a symlink from apt_pkg37m to apt_pkg36m. make sure you are linking to the correct, or at … Read more