Tag: linux

Location of core files in Linux

Location of core files in Linux

Some core files are in the executable file running directory, some core files are in system directory, depending on the system configuration.

Filename

By default, the core file name is core only, different OSs change it's name.

Software

Abrt

Abrt stores core files in /var/cache/abrt.

Apport

Apport stores core files in /var/crash.

Systemd

Systemd updated /proc/sys/kernel/core_pattern as below.

$ cat /proc/sys/kernel/core_pattern
|/usr/lib/systemd/systemd-coredump %p %u %g %s %t %e

OS

TrueNAS Scale

The core files in Linux can be found in /var/db/system/cores/, they can be removed if no debugging required.

Fedora

Fedora store core files in /var/spool/abrt/ instead

Archlinux

Archlinux stores core files in /var/lib/systemd/coredump/

TODO: Cannot set LC_CTYPE/LC_ALL to default locale: No such file or directory

Cannot set LC_CTYPE/LC_ALL to default locale: No such file or directory

Error description

Below error repeatly appears when run apt upgrade.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Scanning processes...
Scanning candidates...
Scanning linux images...
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory

Check /etc/default/locale file,

#  File generated by update-locale
LANG=en_US.UTF-8

it doesn't contain following lines

LC_CTYPE="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

Tried but failed

Tried to run following commands, the errors are still there.

locale-gen "en_US.UTF-8"
dpkg-reconfigure locales

Also added following lines in /etc/environment and /etc/default/locale, still failed

LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8