使用 apt-get 安装软件时,总是出现下面的错误。

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:",
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

安装软件时,都会去执行 update-locale 命令,用来更新 locale。这个命令是 perl 脚本(可以用 whereis update-locale 查到)

root@ubuntu:/# whereis update-locale
update-locale: /usr/sbin/update-locale /usr/share/man/man8/update-locale..gz

使用指令测试 perl,并不是因为 update-locale 命令错了,而是因为 perl 的配置出了问题。

root@ubuntu:/# perl -e exit

perl 使用系统提供的默认 local 的 en_US.UTF-8,但这个值是 ssh 从客户端传递来的,系统其实不知道 en_US.UTF-8 该如何处理。

安装语言包即可,但是不知道语言包名称,此时可以通过官网来查询语言包名称

ubuntu 查询包名网站:https://packages.ubuntu.com/

点击搜索后就会出现匹配的包名,其实 language-pack-en 依赖于 language-pack-en-base,安装 language-pack-en 的同时会默认安装 language-pack-en-base

如果想确认的话可以点击 language-pack-en 下面的 xenial(16.04 LTS),里面可以看到其所有依赖包、推荐包、建议包等。

root@ubuntu:/# apt-get install language-pack-en

安装成功后再使用指令测试 perl,再不会报错。

参考网站:https://www.jianshu.com/p/7cb39acb2513

Linux perl: warning: Setting locale failed.perl: warning: Please check that your locale settings:的更多相关文章

  1. perl: warning: Setting locale failed.

    本篇文章由:http://xinpure.com/perl-warning-setting-locale-failed/ 将 mac 系统切换成英文后,使用 git 命令出现如下错误: perl: w ...

  2. 解决perl: warning: Setting locale failed.

    在Ubuntu Server 12.04上执行apt-get install命令时,报如下warning   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 ...

  3. perl: warning: Setting locale failed. 解决

    perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAG ...

  4. 解决:perl: warning: Please check that your locale settings

    问题: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LAN ...

  5. Please check that your locale settings问题

    问题描述: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: L ...

  6. 1- Mac和Linux远程连接服务器异常修复(WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!)

    p.p1 { margin: 0; font: 11px Menlo; color: rgba(0, 0, 0, 1) } span.s1 { font-variant-ligatures: no-c ...

  7. Linux系统非root用户安装perl模块

    非root权限安装perl 在使用Linux或是unix时,perl是一个非常有用的脚本的语言. 关于perl的模块安装,网上也有很多介绍,一方面可以通过不同套件自带的软件安装工具安装,一方面可以通过 ...

  8. Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 10 in

    Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 10 ...

  9. Installing perl and writing your first perl program in Ubuntu

    Installing perl and writing your first perl program in Ubuntu     Installing perl and writing your f ...

随机推荐

  1. mysql日期模糊查找的方法

    Mysql模糊查询有以下三种方法: 1.Convert转成日期时间型,在用Like查询.select * from table1 where convert(date,DATETIME) like ' ...

  2. C#-MailHelper

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  3. Nginx突破高并发的性能优化 - 运维笔记

    在日常的运维工作中,经常会用到nginx服务,也时常会碰到nginx因高并发导致的性能瓶颈问题.今天这里简单梳理下nginx性能优化的配置(仅仅依据本人的实战经验而述,如有不妥,敬请指出~) 一.这里 ...

  4. Luogu P2330 繁忙的都市

    Luogu P2330 繁忙的都市 裸的最小生成树. 当然,一定要注意它让你输出什么. #include<bits/stdc++.h> #define N 100010 using nam ...

  5. linux网络编程之posix共享内存

    今天继续研究posix IPC对象,这次主要是学习一下posix共享内存的使用方法,下面开始: 下面编写程序来创建一个共享内存: 编译运行: 那posix的共享内存存放在哪里呢?上节中学的posix的 ...

  6. Mybatis3.1-[tp_34-35]-_映射文件_select_resultMap关联查询_collection定义关联集合封装规则_collection分步查询_延迟加载

    笔记要点出错分析与总结工程组织 1.定义接口 interface DepartmentMapper package com.dao; import com.bean.Department; publi ...

  7. python学习之面向对象

    目录 __main__,__name__ __module__,__class__ __init__ __del__ __repr__,__str__ __mro__ __call__ __new__ ...

  8. java TCP 通信:服务端与客服端

    1.首先先来看下基于TCP协议Socket服务端和客户端的通信模型: Socket通信步骤:(简单分为4步) 1.建立服务端ServerSocket和客户端Socket 2.打开连接到Socket的输 ...

  9. Android-jacoco代码覆盖率:单元测试覆盖率+功能测试覆盖率

    参考:https://docs.gradle.org/current/dsl/org.gradle.testing.jacoco.tasks.JacocoCoverageVerification.ht ...

  10. Linux中drwxr-xr-x.的意思和权限

    转载:https://blog.csdn.net/weixin_39209728/article/details/79729885 读(read),写(write),执行r(recute)简写即为(r ...