【问题标题】:Terminal outputting: manpath: can't set the locale; make sure $LC_* and $LANG are correct终端输出:manpath:无法设置语言环境;确保 $LC_* 和 $LANG 是正确的
【发布时间】:2021-02-15 23:50:34
【问题描述】:

在尝试运行特定的 bash 脚本时,我得到以下输出:

manpath: can't set the locale; make sure $LC_* and $LANG are correct
Running node v4.8.5 (npm v2.15.11)
manpath: can't set the locale; make sure $LC_* and $LANG are correct

脚本内容如下:

 #!/bin/bash

. ~/.nvm/nvm.sh
cd /home/desktop/folder/subfolder && nvm exec 4.8.5 node app.js

如果我编写一个小的 bash 脚本,使用 echo 等,则不会发生错误。 我以前没有见过这个错误。原因是什么? 其他答案使它看起来像是一个编码错误。我正在使用 US.UTF-8。

【问题讨论】:

    标签: javascript node.js debugging npm terminal


    【解决方案1】:

    今天这对我有用

    echo "LC_ALL=en_US.UTF-8" >> /etc/environment
    echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
    echo "LANG=en_US.UTF-8" > /etc/locale.conf
    locale-gen en_US.UTF-8
    

    来自https://gist.github.com/zeroc0d3/9d5333d542f7d1bc997d902ac17cd034的资源

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-12-07
      • 2015-02-07
      • 2022-11-13
      • 2017-06-16
      • 2013-07-01
      • 1970-01-01
      • 2010-10-31
      • 2018-02-17
      相关资源
      最近更新 更多