Ubuntu 24.04安装AWS Client VPN启动失败:找不到有效ICU包的问题求助
最近我在新的Ubuntu 24.04机器上安装AWS Client VPN时踩了个坑——运行客户端程序直接报错退出,错误提示找不到有效的ICU包,具体报错信息如下:
Process terminated. Couldn't find a valid ICU package installed on the
system. Set the configuration flag System.Globalization.Invariant to
true if you want to run with no globalization support. at
System.Environment.FailFast(System.String) at
System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
at System.Globalization.GlobalizationMode..cctor() at
System.TimeZoneInfo.GetDisplayName(TimeZoneDisplayNameType,
System.String ByRef) at System.TimeZoneInfo..ctor(Byte[],
System.String, Boolean) at
System.TimeZoneInfo.GetTimeZoneFromTzData(Byte[], System.String) at
System.TimeZoneInfo.GetLocalTimeZoneFromT...
整理的解决思路(分享给同样遇到问题的朋友)
方法1:安装系统ICU依赖包
AWS Client VPN基于.NET运行时,ICU包是它支持全球化功能的必要依赖,直接在终端执行以下命令安装即可:
sudo apt update && sudo apt install libicu-dev
安装完成后重启AWS Client VPN客户端,一般就能正常启动了。
方法2:启用全球化不变模式(临时应急方案)
如果暂时没法安装系统依赖,可以通过设置环境变量绕过ICU检查,启用全球化不变模式:
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
执行完这条命令后,在同一个终端窗口运行AWS Client VPN客户端就能正常启动了。如果想让这个设置永久生效,可以把上述命令添加到你的~/.bashrc(如果用bash)或~/.zshrc(如果用zsh)文件末尾,然后执行source ~/.bashrc(对应你的shell配置文件)让设置立即生效。
备注:内容来源于stack exchange,提问作者Kay

