首页 > 系统相关 >Linux下面提示Encoding 936 data could not be found.

Linux下面提示Encoding 936 data could not be found.

时间:2022-12-02 10:05:40浏览次数:43  
标签:DHClient Encoding could ITC System --- Form1 Linux


最近在使用CentOS 7 进行Mono测试的时候,发现好多异常情况,其中程序里面有用到GBK编码,然后运行的时候就报错了,错误码具体如下:

WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319

Unhandled Exception:
System.TypeInitializationException: The type initializer for 'DAHUASDK.DHClient' threw an exception. ---> System.NotSupportedException: Encoding 936 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
at System.Text.Encoding.GetEncoding (System.Int32 codepage) [0x0025f] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at DAHUASDK.DHClient..cctor () [0x0000c] in <3ba3d1a18b7e4126942cbe57085c9097>:0
--- End of inner exception stack trace ---
at ITC.Form1..ctor () [0x0002f] in <3ba3d1a18b7e4126942cbe57085c9097>:0
at (wrapper remoting-invoke-with-check) ITC.Form1:.ctor ()
at ITC.Program.Main () [0x0000e] in <3ba3d1a18b7e4126942cbe57085c9097>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'DAHUASDK.DHClient' threw an exception. ---> System.NotSupportedException: Encoding 936 data could not be found. Make sure you have correct international codeset assembly installed and enabled.
at System.Text.Encoding.GetEncoding (System.Int32 codepage) [0x0025f] in <dca3b561b8ad4f9fb10141d81b39ff45>:0
at DAHUASDK.DHClient..cctor () [0x0000c] in <3ba3d1a18b7e4126942cbe57085c9097>:0
--- End of inner exception stack trace ---
at ITC.Form1..ctor () [0x0002f] in <3ba3d1a18b7e4126942cbe57085c9097>:0
at (wrapper remoting-invoke-with-check) ITC.Form1:.ctor ()
at ITC.Program.Main () [0x0000e] in <3ba3d1a18b7e4126942cbe57085c9097>:0

处理方法

1, 应该首先locale -a看有没有安装gbk

2, 没安装的话需要先安装gbk编码

3, 然后再安装mono-locale-extras

locale -a
yum install -y mono-locale-extras


标签:DHClient,Encoding,could,ITC,System,---,Form1,Linux
From: https://blog.51cto.com/u_11295556/5905006

相关文章

  • 容器开发运维人员的 Linux 操作机配置优化建议
    "工欲善其事必先利其器",作为一个PAAS平台架构师,容器相关技术(docker,k8s等)是必不可少的.本文简单介绍下我自己的Linux操作机配置.提升工作效率,提高使用体验.❤️......
  • linux firewalld防火墙放行端口
    目录1.firewalld常用命令2.firewalld中放行端口3.firewalld刷新生效4.firewalld放行服务5.放行ip1.firewalld常用命令#查看所有放行端口firewall-cmd--zone=pub......
  • Linux-文本过滤与处理-fold指令:指定文件显示的宽度
    1.fold指令Linuxfold命令用于限制文件列宽。2.fold语法fold[-bs][-w<每列行数>][--help][--version][文件...]3.fold参数-b或--bytes以Byte为单位计算列宽,而非......
  • Linux创建新用户并使用证书远程登录
    因业务需要,需要在服务器上创建多用户,方便多人维护,那么可以利用证书登录创建多用户登录,然后用户如果需要root权限再手动切换即可,下面简单介绍下在Linux上如何进行多用户创......
  • Homebrew:macOS(或 Linux)软件包的管理器
    官方地址:https://brew.sh/GitHub:https://github.com/Homebrew/brew#官方安装(国内会报错):/bin/bash-c"$(curl-fsSLhttps://raw.githubusercontent.com/Homebrew/in......
  • linux使用wget命令批量下载rpm包
    下载命令:wget-nd-r-l1-A.rpm--no-parenthttp://mirrors.163.com/centos/7/os/x86_64/Packages/-erobots=off下载时,仅需要把以上链接换成要下载rpm包路......
  • linux常用命令
    linux常用命令1.man对你熟悉或不熟悉的命令提供帮助解释eg:manls就可以查看ls相关的用法注:按q键或者ctrl+c退出,在linux下可以使用ctrl+c终止当前​​程序​​运行。2.l......
  • Linux Bash字符串操作
    1.在SHELL中同时判断多个条件在SHELLif语句中使用"||"和"&&"要用两个独立的[]if[a-gtb]&&[a-ltc]2.判断字符串为空的方法if["$str"=""......
  • linux常用工具三
    一、yum软件包管理工具注:yum安装或移除一个工具都需要管理员权限。1.查看可安装工具yumlist查看所有可安装工具。2.查找工具1)yumsearchkey搜索指定关键字key的工具。2)yu......
  • Linux 安装
    centos下载地址:​​https://www.centos.org/download/​​以下针对各个版本的ISO镜像文件,进行一一说明:CentOS-7.0-x86_64-DVD-1503-01.iso:标准安装版,一般下载这个就可以......