Last active
April 20, 2022 21:10
-
-
Save smaboshe/d51b102d8a678e0b98e2 to your computer and use it in GitHub Desktop.
locale error running `sudo do-release-upgrade`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo do-release-upgrade # Trying to upgrade from Ubuntu LTS 12.04 to 14.04 | |
Checking for a new Ubuntu release | |
ERROR:root:gedefaultlocale() failed | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/UpdateManager/Core/utils.py", line 353, in get_lang | |
(locale_s, encoding) = locale.getdefaultlocale() | |
File "/usr/lib/python2.7/locale.py", line 503, in getdefaultlocale | |
return _parse_localename(localename) | |
File "/usr/lib/python2.7/locale.py", line 435, in _parse_localename | |
raise ValueError, 'unknown locale: %s' % localename | |
ValueError: unknown locale: en_ZM | |
ERROR:root:gedefaultlocale() failed | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/UpdateManager/Core/utils.py", line 353, in get_lang | |
(locale_s, encoding) = locale.getdefaultlocale() | |
File "/usr/lib/python2.7/locale.py", line 503, in getdefaultlocale | |
return _parse_localename(localename) | |
File "/usr/lib/python2.7/locale.py", line 435, in _parse_localename | |
raise ValueError, 'unknown locale: %s' % localename | |
ValueError: unknown locale: en_ZM | |
ERROR:root:gedefaultlocale() failed | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/UpdateManager/Core/utils.py", line 353, in get_lang | |
(locale_s, encoding) = locale.getdefaultlocale() | |
File "/usr/lib/python2.7/locale.py", line 503, in getdefaultlocale | |
return _parse_localename(localename) | |
File "/usr/lib/python2.7/locale.py", line 435, in _parse_localename | |
raise ValueError, 'unknown locale: %s' % localename | |
ValueError: unknown locale: en_ZM | |
ERROR:root:gedefaultlocale() failed | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/UpdateManager/Core/utils.py", line 353, in get_lang | |
(locale_s, encoding) = locale.getdefaultlocale() | |
File "/usr/lib/python2.7/locale.py", line 503, in getdefaultlocale | |
return _parse_localename(localename) | |
File "/usr/lib/python2.7/locale.py", line 435, in _parse_localename | |
raise ValueError, 'unknown locale: %s' % localename | |
ValueError: unknown locale: en_ZM | |
ERROR:root:gedefaultlocale() failed | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/UpdateManager/Core/utils.py", line 353, in get_lang | |
(locale_s, encoding) = locale.getdefaultlocale() | |
File "/usr/lib/python2.7/locale.py", line 503, in getdefaultlocale | |
return _parse_localename(localename) | |
File "/usr/lib/python2.7/locale.py", line 435, in _parse_localename | |
raise ValueError, 'unknown locale: %s' % localename | |
ValueError: unknown locale: en_ZM | |
ERROR:root:gedefaultlocale() failed | |
Traceback (most recent call last): | |
File "/usr/lib/python2.7/dist-packages/UpdateManager/Core/utils.py", line 353, in get_lang | |
(locale_s, encoding) = locale.getdefaultlocale() | |
File "/usr/lib/python2.7/locale.py", line 503, in getdefaultlocale | |
return _parse_localename(localename) | |
File "/usr/lib/python2.7/locale.py", line 435, in _parse_localename | |
raise ValueError, 'unknown locale: %s' % localename | |
ValueError: unknown locale: en_ZM | |
No new release found | |
$ |
Try adding this line to /etc/environment and rebooting.
LC_ALL="en_US.utf8"
Thanks @generaleye, fixed it for me.
Thanks @generaleye!
@generaleye Thanks. Worked for me.
Great quick fix @generaleye
Thanks!
run this command will help to
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
and this;
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
Try adding this line to /etc/environment and rebooting.
LC_ALL="en_US.utf8"
thanks!
Thanks @generaleye! Also worked for me :)
thanks @generaleye
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change your locale with this command and try to upgrade. Sorry its late. Just seen this and needed a sign up :(
sudo update-locale LANG=en_ZM.UTF-8 LC_MESSAGES=POSIX
you need to logout for it to have effect and then you can upgrade