Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
setlocale: unsupported locale setting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
doskanoness
n00b
n00b


Joined: 06 Oct 2021
Posts: 45

PostPosted: Wed Oct 20, 2021 9:55 pm    Post subject: setlocale: unsupported locale setting Reply with quote

Hello,

I have a "setlocale: unsupported locale setting" warning when I perform Gentoo installation from the Live CD. I'm following the handbook.

Code:
livecd / # emerge-webrsync
!!! Section 'gentoo' in repos.conf has location attribute set to nonexistent directory: '/var/db/repos/gentoo'
!!! Invalid Repository Location (not a dir): '/var/db/repos/gentoo'
Fetching most recent snapshot ...
Trying to retrieve 20211019 snapshot from http://distfiles.gentoo.org ...
Fetching file gentoo-20211019.tar.xz.md5sum ...
Fetching file gentoo-20211019.tar.xz.gpgsig ...
Fetching file gentoo-20211019.tar.xz ...
Checking digest ...
Getting snapshot timestamp ...
Syncing local tree ...

Number of files: 147,341 (reg: 120,523, dir: 26,818)
Number of created files: 147,340 (reg: 120,523, dir: 26,817)
Number of deleted files: 0
Number of regular files transferred: 120,523
Total file size: 227.31M bytes
Total transferred file size: 227.31M bytes
Literal data: 227.31M bytes
Matched data: 0 bytes
File list size: 4.26M
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 112.10M
Total bytes received: 2.41M

sent 112.10M bytes  received 2.41M bytes  3.14M bytes/sec
total size is 227.31M  speedup is 1.99
Cleaning up ...
setlocale: unsupported locale setting
setlocale: unsupported locale setting

 * IMPORTANT: 13 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

livecd / #


I tried to do chroot, locale-gen without success:
Code:
chroot /mnt/gentoo /bin/bash
env-update && source /etc/profile
locale-gen
exit


My /etc/locale.gen:
Code:
livecd / # cat /etc/locale.gen

C.UTF8 UTF-8

livecd / #


What should I do to solve this problem? Can this warning be ignored without negative consequences?
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Wed Oct 20, 2021 10:06 pm    Post subject: Reply with quote

Does this happen after you chrooted to your new system? But you haven't booted from your new system, have you? Where exactly are you in the installation process? Please tell us the section in the handbook.

Last edited by mike155 on Wed Oct 20, 2021 10:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
doskanoness
n00b
n00b


Joined: 06 Oct 2021
Posts: 45

PostPosted: Wed Oct 20, 2021 10:12 pm    Post subject: Reply with quote

Code:
livecd / # emerge --info
setlocale: unsupported locale setting
setlocale: unsupported locale setting
Portage 3.0.20 (python 3.9.7-final-0, default/linux/amd64/17.1/no-multilib/hardened, gcc-11.2.0, glibc-2.33-r1, 5.10.61-gentoo-x86_64 x86_64)
=================================================================
System uname: Linux-5.10.61-gentoo-x86_64-x86_64-Intel-R-_Core-TM-_i7-8750H_CPU_@_2.20GHz-with-glibc2.33
KiB Mem:     1013540 total,    248612 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 20 Oct 2021 00:45:01 +0000
Head commit of repository gentoo: 429678d37bc0af6c96146d4df7de5c0252aa6613
sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r3::gentoo
dev-lang/python:          3.9.7_p1::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.43.5-r1::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.71-r1::gentoo
sys-devel/automake:       1.16.4::gentoo
sys-devel/binutils:       2.37_p1::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts:
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 bzip2 crypt hardened iconv ipv6 libglvnd libtirpc ncurses nls nptl openmp pam pcre pie readline seccomp split-usr ssl ssp unicode xattr xtpax zlib" ABI_X86="64" ADA_TARGET="gnat_2019" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

livecd / # locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=C.UTF8
LC_CTYPE="C.UTF8"
LC_NUMERIC=pl_PL.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE=pl_PL.UTF-8
LC_MONETARY=pl_PL.UTF-8
LC_MESSAGES="C.UTF8"
LC_PAPER="C.UTF8"
LC_NAME="C.UTF8"
LC_ADDRESS="C.UTF8"
LC_TELEPHONE="C.UTF8"
LC_MEASUREMENT=pl_PL.UTF-8
LC_IDENTIFICATION="C.UTF8"
LC_ALL=
livecd / # locale -a
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
C.utf8
POSIX
livecd / # eselect locale list
/usr/bin/locale: Cannot set LC_COLLATE to default locale: No such file or directory
Available targets for the LANG variable:
  [1]   C
  [2]   C.utf8
  [3]   POSIX
  [4]   C.UTF8 *
  [ ]   (free form)
Back to top
View user's profile Send private message
doskanoness
n00b
n00b


Joined: 06 Oct 2021
Posts: 45

PostPosted: Wed Oct 20, 2021 10:13 pm    Post subject: Reply with quote

mike155 wrote:
Does this happen after you chrooted to your new system?

Yes
mike155 wrote:
Where exactly are you in the installation process?

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base
Installing a Gentoo ebuild repository snapshot from the web
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Wed Oct 20, 2021 10:21 pm    Post subject: Reply with quote

Okay, so why have you configured
Code:
LC_NUMERIC=pl_PL.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE=pl_PL.UTF-8
LC_MONETARY=pl_PL.UTF-8

Configuring the locale is part of the next chapter. :)

Either go back to "C.UTF8" - or add "pl_PL.UTF-8" to /etc/locale.gen and run "locale-gen".

Please note that you can only use locales that are shown by "locale -a". "locale -a " doesn't show "pl_PL.UTF-8", therefore it's invalid. You must create that locale with "locale-gen" (see last paragraph) before you can use it. After that, "locale -a" will show it.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Wed Oct 20, 2021 10:57 pm    Post subject: Reply with quote

there's a little misbehaviour after setting locale while in chroot.

after running locale-gen and eselect locale list and eselect locale set the system is telling you what to do by running, e.g:

Code:
. /etc/profile


but the system jumps out of chroot, after running above command (<<< this always happens to me), therefore you've to run again:

Code:
export PS1="(chroot) ${PS1}"


only after that locale will be set - check again with locale -a and eveything will be alright.

good luck :D
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21602

PostPosted: Thu Oct 21, 2021 1:02 am    Post subject: Reply with quote

CooSee wrote:
there's a little misbehaviour after setting locale while in chroot.

after running locale-gen and eselect locale list and eselect locale set the system is telling you what to do by running, e.g:
Code:
. /etc/profile
but the system jumps out of chroot, after running above command (<<< this always happens to me)
This sounds incorrect. Sourcing /etc/profile should not exit the chroot.
CooSee wrote:
therefore you've to run again:
Code:
export PS1="(chroot) ${PS1}"
However, sourcing /etc/profile could change the prompt. That does not mean the shell exits the chroot though, only that it is labeled differently.
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Thu Oct 21, 2021 2:05 am    Post subject: Reply with quote

Quote:
However, sourcing /etc/profile could change the prompt. That does not mean the shell exits the chroot though, only that it is labeled differently.


this behavior always confused me, therefore i ran the export command again :roll: - to get sure which terminal is chroot, because my last gentoo installations was always from within running gentoo - i like watching movies while installing 8)

and i have 2 or 3 terminal tabs open at the same time, e.g. chroot terminal, mc terminal and 3rd running gentoo terminal to look for installed ebuilds or whatever i need to compare.

can this behavior changed or it'll confuse other users too, maybe :)

thx @ Hu
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum