Hi All,
I am running a perl script which integrates several tools like fastqc, bwa, and samtools to call variants. Recently, while calling this perl script I am getting error message as follows:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US.utf8",
LC_ALL = "en_US.utf8",
LC_TYPE = "en_US.utf8",
LANG = "en_US.utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
sh: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
sh: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
I have tried to resolve this error by setting /etc/environment to
LANGUAGE = "en_US.utf8",
LC_ALL = "en_US.utf8",
LC_TYPE = "en_US.utf8",
LANG = "en_US.utf8"
but i still get this error and the pipeline is not running.
Except for bwa-index the other tools can not run individually through command line with this warning. I am using centos release 6.9
and gcc version
ldd (GNU libc) 2.12
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
Has anyone encountered this error? and how can I resolve this??
Thanks in advance !!
What do you get when you run
locale
?Can you also tell us what Linux distribution (version numbers etc) you're running? (output of
uname -a
would probably suffice).Output:
Output:
I'm not sure if this is the specific fix, but I think your method of setting them may be incorrect. I don't believe you need commas after them.
Try setting your user locale only rather than manipulating a system wide file like
/etc/environment
Add the following to your relevant
~/.bashrc
or equivalent file:This will set it each time you login. You could test whether it works by running that command at the prompt and retrying the installation, but the change may not stick next time you log in if you don't add it to one of your dotfiles.
Hi Joe,
There are no commas in the etc environment file.
I am still getting the same error, even with the above command
Are you connected via SSH to this system or is it your local machine?
I believe am connected via ssh. Although I am not sure how to check it.
The
top
command outputThe
who i am
outputdid you connect to a remote server with the
ssh
command?Does the command
echo "$SSH_CLIENT"
return anything other than a blank line?It does not return a blank line. It returns an ip address.
Ok yep, you're on a server - are you connecting from a Mac?
Have you explored the answers here?