"Gtk-WARNING **: language not supported by library C. Using fallback" C "locale. on OS X
Reference Information:
I am using Mac OSX Yosemite.
I installed gtk+
with brew install gtk+
and fixed errors with export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig
.
I compiled my program using make
, but when I try to run it I get a warning like this:
(process:16182): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Problem: I cannot find any OS X solutions for this specific issue.
What I have learned so far:
In this thread ( Gtk-WARNING **: locale is not supported by C library when using multiple Python modules (mayavi, spectral) ) they suggest using:
ipython --pylab=wx
insteadipython --pylab=osx
gtk+
)You can find many topics on this issue, for example: ( Gtk-WARNING **: locale is not supported by the C library when running applications from the command line ), but they are mostly Linux and / or Ubuntu specific.
Most answers will sooner or later use a command like this:sudo dpkg-reconfigure locales
But on OS X, no
dpkg
.
source to share
The problem here is that the environment variable is LANG
not set because I have a mixed setting for Polish and English under Language and Region in System Preferences.
Quoting @KenThomases who helped me a lot with this problem:
In Poland there will be no C library locale defined for English (i.e. en_PL.UTF-8). That's why Terminal doesn't install LANG for you in your shells, even though you've enabled "Set locale environment variables at startup".
You can read an in-depth solution here:
Is it bad that LANG and LC_ALL are empty when running `locale -a` on OS X Yosemite?
source to share