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

install.sh scheitert an Spracheinstellungen #2

Closed
dukpeters opened this issue Jan 22, 2020 · 5 comments
Closed

install.sh scheitert an Spracheinstellungen #2

dukpeters opened this issue Jan 22, 2020 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@dukpeters
Copy link

Hallo

ich versuche Raspion auf einen Pi 4B mit Buster zu installieren. Spracheinstellungen sind English (US) mit deutschem Keyboard

Output:
./install.sh
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
==> Einrichtung des c't-Raspion (v103)

  • Hilfspakete hinzufügen, Paketlisten aktualisieren
  • Raspbian aktualisieren ...
  • Raspbian Sprachanpassungen ...
    Installation leider fehlgeschlagen in Zeile 42.

logfile:

  • Raspbian Sprachanpassungen ...
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US.UTF-8",
    LC_ALL = "en_US.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    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
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US.UTF-8",
    LC_ALL = "en_US.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    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
    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
    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
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US.UTF-8",
    LC_ALL = "en_US.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    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
    Generating locales (this might take a while)...
    de_DE.UTF-8... done
    en_GB.UTF-8... done
    Generation complete.
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US.UTF-8",
    LC_ALL = "en_US.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    *** update-locale: Error: invalid locale settings: LC_ALL=en_US.UTF-8 LANG=de_D
    E.UTF-8 LANGUAGE=en_US.UTF-8
@Diggen85
Copy link
Collaborator

Hallo,

das Problem besteht darin, wie install.sh die locales auf DE stellt in Kombination mit der Änderung der standard locales von en_GB.UTF-8 zu en_US.UTF-8.
Es findet in der aktuellen Version kein Check statt... Es wird files/locale.gen nach /etc kopiert.
Dort sind nur en_GB.UTF8 und de_DE.UTF-8 auskommentiert. Nach dpkg-reconfigure locales existiert en_US.UTF-8 dann nicht mehr.

Als kurzer Bugfix müssten folgende 2 Optionen klappen

  1. Das # bei en_US.UTF-8 in files/local.gen entfernen - damit würde en_US.UTF-8 nicht entfernt.

  2. Oder in install.sh die folgende Zeile:
    sudo update-locale LANG=$NEWLANG >> $LOG 2>&1
    ändern in:
    sudo update-locale LC_ALL=$NEWLANG LANG=$NEWLANG LANGUAGE=$NEWLANG >> $LOG 2>&1
    Dann sollte vom System durchgehend de_DE.UTF-8 benutzt werden

Schöne Grüße
Benny

@Diggen85 Diggen85 added the bug Something isn't working label Jan 22, 2020
@dukpeters
Copy link
Author

workaround #1 hat nicht funktioniert - der gleiche Fehler.
Danach bekomme ich allerdings bei neuen shell instanzen (sudo oder neuen login) immer die Meldung: "/bin/bash: warning: setlocale: LC_ALL: cannot change locale (de_DE)"
Habe ich mir damit jetzt meine system-locale zerschosssen? Ich wollte ja absichtlich auf en_US bleiben.

Mit #2 funktioniert die installation

@Diggen85 Diggen85 self-assigned this Jan 23, 2020
@Diggen85
Copy link
Collaborator

Diggen85 commented Jan 23, 2020

Ok... Das ist komisch. 1# dürfte an LC_ALL nichts ändern. Ist aber kein Problem - die locales sind sind nicht defekt, nur die config zeigt auf de_DE welches nicht existiert. Es müsste de_DE.UTF-8 sein. Mich persönlich würde die Ausgabe von locale -a && cat /etc/default/locale interessieren.

Das ganze bekommt man relativ schnell wieder hin:
sudo update-locale LC_ALL LANG LANGUAGE && sudo dpkg-reconfigure locales ausführen und die gewollten Sprachen auswählen.

Kurze Erklärung:
LC_* Environment-Variabeln bestimmen welche Sprache bei Datum, Meldungen etc. genutzt werden soll. LANG (und LANGUAGE) wird dafür als default bei allen nicht gefüllten Variablen genutzt.
dpkg-reconfigure locales editiert im Prinzip /etc/local.gen. local-gen generiert dann alle ausgewählten locales. update-locale setzt dann die Umgebungs-Variablen.
Mit locale -a werden alle verfügbaren angezeigt. Eine gute Praxis ist die locales auf die eigene Sprache zu setzen und wenn man Fehler mit globalen/englischen Fehlertext benötigt, dass Programm mit LC_ALL=C _Befehl_ zu starten.

@dukpeters
Copy link
Author

danke für die Erklärung und die schnellen Antworten

@dukpeters
Copy link
Author

workaround wirkt - danke

Diggen85 added a commit that referenced this issue Jan 27, 2020
- move NEWLANG variable to header, as it 's a configurable one
- don't overwrite /etc/locale.gen but uncomment $NEWLANG inplace
- generate $NEWLANG and change default LANG  to $NEWLANG with respect of already active locales and LC_*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants