-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default locale is set to en_US.UTF-8 but it's missing #71
Comments
Here's the full output of Any ideas? |
It looks like the following might be a workaround until this is fixed:
|
The same is happening for us and it related to gcc update. It will happen even when you create Dockerfile |
FROM centos:7 This will update gcc and screw up locale. Very annoing, as in general I avoid running yum update but unfortunately for Selenium I need to install chrome and it will do it anyway. |
Also seeing this issue just now:
Around a month ago we were not hitting this issue. |
I think we just need up to date centos docker image (CentOS-7 (1611)). Probably yum updates something it shouldn't. |
@remy-tiitre For us, we don't want to immediately take 1611 so ideally there would be a solution that doesn't involve taking that immediately. As @robinst suggests, our current workaround is to just run |
I'm not even sure that 1611 fixes it, but there should be a Docker image for that for sure. Hopefully it will be created soon. localedef is a solution for most cases but it gets annoing if you use https://chrome.richardlloyd.org.uk/ install_chrome.sh or any other script like that (you have to modify the script itself). I also noticed some other warnings that usually I would like to avoid in my docker containers :) I believe they are all solvable, but I would rather prefer 1611 where yum update does not update those base components. |
So, I've spent a couple days sorting out the 7.3.1611 base container (which should be arriving shortly) This glibc behavior is consistent, though I don't fully understand why yet. With a brand new 7.3.1611 container, the locales are as expected. a 'yum reinstall glibc-common' reduces the available locales to POSIX and C, reliably. |
I've experienced the same issue. Updating glibc-common eliminates the en-US.UTF-8 locale which causes problems for a lot of applications. Running |
I also noticed that reinstalling glibc-common would blow away the locales. I noticed that changing the line in /etc/yum.conf
to
and then reinstalling glibc-common will produce a en_US.utf8 locale (seen by I think the provided setting in /etc/yum.conf should be changed unless this is an issue with build-locale-archive. |
encounter this issue also. the workaround I use is to unset LC_ALL environment variable before running my program in Dockerfile like: ENV LC_ALL= please fix it as soon as possible. Thanks! |
This seems to have been fixed in the latest images. I don't know for sure, but I'm guessing that it was the locale-handling changes in this changeset: CentOS/sig-cloud-instance-build@b74306a |
This should be resolved once the latest 7 base image is merged in, changed in docker-library/official-images#2750 |
Looks like that PR is merged now. |
Issue: CentOS/sig-cloud-instance-images#71 x86_64 kickstart file fix: 2892c17
Issue: CentOS/sig-cloud-instance-images#71 x86_64 kickstart file fix: 2892c17
Since this was pushed here: https://github.com/docker-library/official-images/pull/2750/files could we close this issue? |
yup. |
I've had this issue on Centos 8 image, when I ran
I found running There is a comment that says
|
On AArch64 running "yum update glibc-common" from 2.17-260 to 2.17-292 removes every locale other than C and POSIX. On x86-64 it ends in C, POSIX, en_US.utf8 being defined. |
Problem
Steps to reproduce$ docker pull centos:latest
$ docker run -it centos
[root@docker]# uname -a
Linux 1698c6775409 4.9.184-linuxkit #1 SMP Tue Jul 2 22:58:16 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@docker]# yum update -y && yum clean all. # per docker hub readme.md
[root@docker]# yum search python
Failed to set locale, defaulting to C # ERROR
Last metadata expiration check: 0:09:02 ago on Sat Nov 2 17:57:53 2019.
Dependencies resolved. Resolution[root@docker]# yum -y install glibc-langpack-en.x86_64
[root@docker]# yum search python
Last metadata expiration check: 0:09:10 ago on Sat 02 Nov 2019 05:57:53 PM UTC.
Dependencies resolved.
Nothing to do. |
@zazazack I get an error trying to install that package |
Adding this package fixes warnings like these: bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8) As well as allows the monolithic image to initdb properly: /etc/default/evm: line 26: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory /etc/default/evm: line 26: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8) == Checking MIQ database status == ** DB has not been initialized ** Launching initdb The files belonging to this database system will be owned by user "postgres". This user must also own the server process. initdb: invalid locale settings; check LANG and LC_* environment variables !! Failed to initdb ref: CentOS/sig-cloud-instance-images#71
Adding this package fixes warnings like these: bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8) As well as allows the monolithic image to initdb properly: /etc/default/evm: line 26: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory /etc/default/evm: line 26: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8) == Checking MIQ database status == ** DB has not been initialized ** Launching initdb The files belonging to this database system will be owned by user "postgres". This user must also own the server process. initdb: invalid locale settings; check LANG and LC_* environment variables !! Failed to initdb ref: CentOS/sig-cloud-instance-images#71
Hi, I am still seeing this problem when I use the
|
This works around CentOS/sig-cloud-instance-images#71 Signed-off-by: Lance Albertson <[email protected]>
For 'alt linux' way to fix it: apt-get install glibc-locales glibc-timezones |
We use the CentOS 7 image for testing, and have had an error related to locales that started happening only a few days ago. Steps to reproduce:
Using the following Dockerfile:
Build it:
Run the build image:
We narrowed it down to the combination of the two packages
gcc
andlibmemcached-devel
. If just installing either one on its own, the problem doesn't occur.libmemcached-devel
seems to pull in a package that creates/etc/profile.d/lang.sh
which seems to be the thing setting the locale.But somehow in that yum transaction, the locales seem to not be built properly, as you can see in the
locale -a
output above.The text was updated successfully, but these errors were encountered: