Skip to content
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

Locale issue after upgrading to Ubuntu 16.10 from a clean installation of Ubuntu 16.04 #1232

Closed
ZHOUYue67 opened this issue Oct 20, 2016 · 11 comments

Comments

@ZHOUYue67
Copy link

ZHOUYue67 commented Oct 20, 2016

I know that Ubuntu 16.10 is not supported right now. I am just reporting this issue hoping it might help.

  • A brief description
    System cannot read locales correctly right after upgrading to Ubuntu 16.10 from a clean installation of Ubuntu 16.04
  • Expected results
    No locale related errors/warnings when running arbitrary executables
  • Actual results (with terminal output if applicable)
    Take locale command for example, the output is:
$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

more outputs provided at the end of this post

  • Your Windows build number
    Fast Build 14951.rs_prerelease.161014-1700
  • Steps / All commands required to reproduce the error from a brand new installation
    1. Clean install Ubuntu 16.04 and set the locale to en_US.UTF-8
    2. Set Prompt=normal in /etc/update-manager/release-upgrades
    3. Run do-release-upgrade to upgrade to Ubuntu 16.10
    4. See locale warnings described above during and after upgrading
  • Strace of the failing command
$ strace -e file locale
execve("/usr/bin/locale", ["locale"], [/* 15 vars */]) = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/en_US.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.UTF-8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.utf8/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_CTYPE", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
locale: Cannot set LC_CTYPE to default locale: No such file or directory
open("/usr/lib/locale/en_US.UTF-8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.UTF-8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.utf8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.utf8/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
open("/usr/lib/locale/en_US.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_US/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.UTF-8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.utf8/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_IDENTIFICATION", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
+++ exited with 0 +++
  • Required packages and commands to install
    no

More outputs and details

  • Run sudo locale-gen
$ sudo locale-gen
Generating locales (this might take a while)...
  en_US.UTF-8...character map file `UTF-8' not found: No such file or directory
default character map file `ANSI_X3.4-1968' not found: No such file or directory
 done
  zh_CN.UTF-8...character map file `UTF-8' not found: No such file or directory
default character map file `ANSI_X3.4-1968' not found: No such file or directory
 done
  zh_HK.UTF-8...character map file `UTF-8' not found: No such file or directory
default character map file `ANSI_X3.4-1968' not found: No such file or directory
 done
  zh_SG.UTF-8...character map file `UTF-8' not found: No such file or directory
default character map file `ANSI_X3.4-1968' not found: No such file or directory
 done
  zh_TW.UTF-8...character map file `UTF-8' not found: No such file or directory
default character map file `ANSI_X3.4-1968' not found: No such file or directory
 done
Generation complete.
  • Run ls /usr/share/i18n/charmaps/
$ ls /usr/share/i18n/charmaps/
ANSI_X3.110-1983.gz    IBM1026.gz        ISO-IR-209.gz
ANSI_X3.4-1968.gz      IBM1047.gz        ISO-IR-90.gz
ARMSCII-8.gz           IBM1124.gz        ISO_10367-BOX.gz
ASMO_449.gz            IBM1129.gz        ISO_10646.gz
BIG5-HKSCS.gz          IBM1132.gz        ISO_11548-1.gz
BIG5.gz                IBM1133.gz        ISO_2033-1983.gz
BRF.gz                 IBM1160.gz        ISO_5427-EXT.gz
BS_4730.gz             IBM1161.gz        ISO_5427.gz
BS_VIEWDATA.gz         IBM1162.gz        ISO_5428.gz
CP10007.gz             IBM1163.gz        ISO_646.BASIC.gz
CP1125.gz              IBM1164.gz        ISO_646.IRV.gz
CP1250.gz              IBM256.gz         ISO_6937-2-25.gz
CP1251.gz              IBM273.gz         ISO_6937-2-ADD.gz
CP1252.gz              IBM274.gz         ISO_6937.gz
CP1253.gz              IBM275.gz         ISO_8859-1,GL.gz
CP1254.gz              IBM277.gz         ISO_8859-SUPP.gz
CP1255.gz              IBM278.gz         IT.gz
CP1256.gz              IBM280.gz         JIS_C6220-1969-JP.gz
CP1257.gz              IBM281.gz         JIS_C6220-1969-RO.gz
CP1258.gz              IBM284.gz         JIS_C6229-1984-A.gz
CP737.gz               IBM285.gz         JIS_C6229-1984-B-ADD.gz
CP770.gz               IBM290.gz         JIS_C6229-1984-B.gz
CP771.gz               IBM297.gz         JIS_C6229-1984-HAND-ADD.gz
CP772.gz               IBM420.gz         JIS_C6229-1984-HAND.gz
CP773.gz               IBM423.gz         JIS_C6229-1984-KANA.gz
CP774.gz               IBM424.gz         JIS_X0201.gz
CP775.gz               IBM437.gz         JOHAB.gz
CP949.gz               IBM500.gz         JUS_I.B1.002.gz
CSA_Z243.4-1985-1.gz   IBM850.gz         JUS_I.B1.003-MAC.gz
CSA_Z243.4-1985-2.gz   IBM851.gz         JUS_I.B1.003-SERB.gz
CSA_Z243.4-1985-GR.gz  IBM852.gz         KOI-8.gz
CSN_369103.gz          IBM855.gz         KOI8-R.gz
CWI.gz                 IBM856.gz         KOI8-RU.gz
DEC-MCS.gz             IBM857.gz         KOI8-T.gz
DIN_66003.gz           IBM860.gz         KOI8-U.gz
DS_2089.gz             IBM861.gz         KSC5636.gz
EBCDIC-AT-DE-A.gz      IBM862.gz         LATIN-GREEK-1.gz
EBCDIC-AT-DE.gz        IBM863.gz         LATIN-GREEK.gz
EBCDIC-CA-FR.gz        IBM864.gz         MAC-CENTRALEUROPE.gz
EBCDIC-DK-NO-A.gz      IBM865.gz         MAC-CYRILLIC.gz
EBCDIC-DK-NO.gz        IBM866.gz         MAC-IS.gz
EBCDIC-ES-A.gz         IBM866NAV.gz      MAC-SAMI.gz
EBCDIC-ES-S.gz         IBM868.gz         MAC-UK.gz
EBCDIC-ES.gz           IBM869.gz         MACINTOSH.gz
EBCDIC-FI-SE-A.gz      IBM870.gz         MIK.gz
EBCDIC-FI-SE.gz        IBM871.gz         MSZ_7795.3.gz
EBCDIC-FR.gz           IBM874.gz         NATS-DANO-ADD.gz
EBCDIC-IS-FRISS.gz     IBM875.gz         NATS-DANO.gz
EBCDIC-IT.gz           IBM880.gz         NATS-SEFI-ADD.gz
EBCDIC-PT.gz           IBM891.gz         NATS-SEFI.gz
EBCDIC-UK.gz           IBM903.gz         NC_NC00-10.gz
EBCDIC-US.gz           IBM904.gz         NEXTSTEP.gz
ECMA-CYRILLIC.gz       IBM905.gz         NF_Z_62-010.gz
ES.gz                  IBM918.gz         NF_Z_62-010_1973.gz
ES2.gz                 IBM922.gz         NS_4551-1.gz
EUC-JISX0213.gz        IEC_P27-1.gz      NS_4551-2.gz
EUC-JP-MS.gz           INIS-8.gz         PT.gz
EUC-JP.gz              INIS-CYRILLIC.gz  PT154.gz
EUC-KR.gz              INIS.gz           PT2.gz
EUC-TW.gz              INVARIANT.gz      RK1048.gz
GB18030.gz             ISIRI-3342.gz     SAMI-WS2.gz
GB2312.gz              ISO-8859-1.gz     SAMI.gz
GBK.gz                 ISO-8859-10.gz    SEN_850200_B.gz
GB_1988-80.gz          ISO-8859-11.gz    SEN_850200_C.gz
GEORGIAN-ACADEMY.gz    ISO-8859-13.gz    SHIFT_JIS.gz
GEORGIAN-PS.gz         ISO-8859-14.gz    SHIFT_JISX0213.gz
GOST_19768-74.gz       ISO-8859-15.gz    T.101-G2.gz
GREEK-CCITT.gz         ISO-8859-16.gz    T.61-7BIT.gz
GREEK7-OLD.gz          ISO-8859-2.gz     T.61-8BIT.gz
GREEK7.gz              ISO-8859-3.gz     TCVN5712-1.gz
HP-GREEK8.gz           ISO-8859-4.gz     TIS-620.gz
HP-ROMAN8.gz           ISO-8859-5.gz     TSCII.gz
HP-ROMAN9.gz           ISO-8859-6.gz     UTF-8.gz
HP-THAI8.gz            ISO-8859-7.gz     VIDEOTEX-SUPPL.gz
HP-TURKISH8.gz         ISO-8859-8.gz     VISCII.gz
IBM037.gz              ISO-8859-9.gz     WINDOWS-31J.gz
IBM038.gz              ISO-8859-9E.gz
IBM1004.gz             ISO-IR-197.gz
  • Package gzip is already installed and installing locales-all does not help
  • After the steps below, the locale errors/warnings no longer exists.
$ cd /usr/share/i18n/charmaps/
$ sudo gzip -dk UTF-8.gz
$ sudo locale-gen
Generating locales (this might take a while)...
  en_US.UTF-8... done
$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
@fpqc
Copy link

fpqc commented Oct 20, 2016

You have to unzip the locale file for some reason, I found.

@ZHOUYue67
Copy link
Author

ZHOUYue67 commented Oct 21, 2016

@fpqc Yes. On a 'real' Ubuntu 16.10 machine, files under /usr/share/i18n/charmaps are not required to be decompressed first to be used.

@fpqc
Copy link

fpqc commented Oct 21, 2016

@MikeChou Someone, either Rolisoft or Therealkenc found exactly which failing syscall causes this.

@barda
Copy link

barda commented Oct 26, 2016

I have the same error message: my /bin/gzip was corrupted, reinstalling gzip package fixed the issue.

@zerocool4u2
Copy link

i also have to recreate this file https://www.apt-browse.com/browse/ubuntu/trusty/main/all/locales/2.13+git20120306-12/file/usr/share/locales/install-language-pack for installing other packages(chmod 755), thanks for the gzip clue, in my case have to manually do it, re installing gzip didn't do the trick, regards!

@LordMonoxide
Copy link

Confirmed, issue is corrected by unzipping the locale and running locale-gen

@JackieKu
Copy link

locale-gen had been broken for a long time. The direct cause was #1005 but since the bug was fixed now it raises another error:

localedef: ../sysdeps/unix/sysv/linux/spawni.c:360: __spawnix: Assertion `ec >= 0' failed.

@fpqc
Copy link

fpqc commented Apr 10, 2017

@JackieKu could you file a new bug?

@JackieKu
Copy link

JackieKu commented Apr 11, 2017

@fpqc Sure. #1878

@therealkenc
Copy link
Collaborator

/dupe #1005

@ghost
Copy link

ghost commented Sep 4, 2020

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost closed this as completed Sep 4, 2020
@ghost ghost added the duplicate label Sep 4, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants
@JackieKu @LordMonoxide @barda @zerocool4u2 @ZHOUYue67 @fpqc @therealkenc and others