runner icon indicating copy to clipboard operation
runner copied to clipboard

Runner (v2.303) not working on AmazonLinux2023 due to missing ICU package

Open jalbstmeijer opened this issue 2 years ago • 10 comments

Describe the bug The runner cannot be started due to a missing requirement.

Couldn't find a valid ICU package installed on the system

To Reproduce Steps to reproduce the behavior:

  1. start a AmazonLinux2023 AMI, for instance ami-00169914e6299b8e0 in eu-west-1
  2. download and unpack actions-runner-linux-x64-2.303.0.tar.gz
  3. run after config.sh, run.sh and see error

Expected behavior Running runner

Runner Version and Platform

runner-v2.303 AmazonLinux2023

What's not working?

./run.sh

Libicu's dependencies is missing for Dotnet Core 6.0
Execute sudo ./bin/installdependencies.sh to install any missing Dotnet Core 6.0 dependencies.
Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.
   at System.Environment.FailFast(System.String)
   at System.Globalization.GlobalizationMode+Settings..cctor()
   at System.Globalization.CultureData.CreateCultureWithInvariantData()
   at System.Globalization.CultureData.get_Invariant()
   at System.Globalization.CultureInfo..cctor()
   at System.Globalization.CultureInfo.get_CurrentCulture()
   at System.Text.RegularExpressions.Regex.Init(System.String, System.Text.RegularExpressions.RegexOptions, System.TimeSpan, System.Globalization.CultureInfo)
   at System.Text.RegularExpressions.Regex..ctor(System.String, System.Text.RegularExpressions.RegexOptions, System.TimeSpan, System.Globalization.CultureInfo)
   at System.Text.RegularExpressions.Regex..ctor(System.String, System.Text.RegularExpressions.RegexOptions)
   at GitHub.Runner.Sdk.RunnerWebProxy..ctor()
   at GitHub.Runner.Common.HostContext..ctor(System.String, System.String)
   at GitHub.Runner.Listener.Program.Main(System.String[])
/tmp/actions-runner/run-helper.sh: line 36:  2220 Aborted                 (core dumped) "$DIR"/bin/Runner.Listener run $*
Exiting with unknown error code: 134
Exiting runner...

jalbstmeijer avatar Mar 29 '23 11:03 jalbstmeijer

Hi @jalbstmeijer,

I faced the same problem today with an amzn2 linux centos rhel fedora and in order to solve it, I just followed what the error message indicates.

Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.

I did the .NET installation following this link, I don't think it's really necessary but try that too:

Even after installing dotnet I still got the same error.

But I managed to solve it on the spot by installing the libicu package for centOS, so you should follow these steps:

Please install libicu using your package manager and try again.

1 - You can check if libicu is installed on your operating system:

rpm -q libicu

2 - It's probably not installed so run this command to install libicu using yum:

yum install libicu -y

3 - After that check again if libicu is installed, you should see something like this:

[root@self-hosted-runner bin]# rpm -q libicu
libicu-50.2-4.amzn2.x86_64

I also followed this link to install libicu: https://yum-info.contradodigital.com/view-package/base/libicu/

I've been configuring self-hosted runners for a long time, and today was the first time I received this error, after a bit of research I was able to finish the runner configuration smoothly.

Hope this helps you too, Regards

softlberton avatar Mar 29 '23 23:03 softlberton

Hi @softlberton

Thank you very much for your feedback. I indeed got it to work after installing the libicu package. I suppose this needs to be fixed/added to bin/installdependencies.sh?

This because projects like https://github.com/machulav/ec2-github-runner expect bin/installdependencies.sh to do it all.

Gr, J

jalbstmeijer avatar Mar 30 '23 14:03 jalbstmeijer

I don't know exactly, because I ran it a few times but it wasn't enough, it seemed that my machine lacked libicu and some dotnet packages, so I didn't delve into that.

By the way, this repository is quite interesting, if possible it would be necessary to open a PR or some problem indicating the need for libicu or at least check to see if it is installed on the operating system that will be used to configure the runner.

I'm glad you were able to solve your problems, so you can close this issue, let me know.

softlberton avatar Mar 30 '23 14:03 softlberton

WOW you are very fast and I appreciate that !!

I will be following closely.

softlberton avatar Mar 30 '23 14:03 softlberton

Hi everyone, run.sh works fine for me but running the runner as a service with svc.sh encounters this error libicu is installed and exported DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 i still have the error sudo journalctl -u 'runner-name' -f Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: at System.Globalization.CultureInfo..cctor() Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: at System.Globalization.CultureInfo.get_CurrentCulture() Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: at System.Text.RegularExpressions.Regex.Init(System.String, System.Text.RegularExpressions.RegexOptions, System.TimeSpan, System.Globalization.CultureInfo) Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: at System.Text.RegularExpressions.Regex..ctor(System.String, System.Text.RegularExpressions.RegexOptions, System.TimeSpan, System.Globalization.CultureInfo) Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: at System.Text.RegularExpressions.Regex..ctor(System.String, System.Text.RegularExpressions.RegexOptions) Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: at GitHub.Runner.Sdk.RunnerWebProxy..ctor()Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: at GitHub.Runner.Common.HostContext..ctor(System.String, System.String) Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: at GitHub.Runner.Listener.Program.Main(System.String[])Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: Runner listener exited with error code null Jul 13 03:58:34 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: Runner listener exit with undefined return code, re-launch runner in 5 seconds. Jul 13 03:58:39 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: Starting Runner listener with startup type: service Jul 13 03:58:39 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: Started listener process, pid: 46346 Jul 13 03:58:39 xsnl70k658w.pharma.aventis.com runsvc.sh[43981]: Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.

wassimrkik avatar Jul 13 '23 07:07 wassimrkik

Come to think of it... my Pull Request there probably also fixes the Amazon Linux 2 issue mentioned above.

stewartsmith avatar Feb 16 '24 15:02 stewartsmith

Come to think of it... my Pull Request there probably also fixes the Amazon Linux 2 issue mentioned above.

It's interesting to see that this issue remains open and there are people working to improve this problem.

softlberton avatar Feb 20 '24 09:02 softlberton

any solutions/updates?

davi020 avatar Jun 20 '24 14:06 davi020

@davi020 , not sure if it's fixed in this project. But with the 'pre-runner-script' option of the ec2-github-runner action you can now install any dependency needed.

jalbstmeijer avatar Jun 20 '24 14:06 jalbstmeijer

Thanks @jalbstmeijer - I am following script based installation process based on this doc (this scripts automates the runner installation and service config setup) and I tried this on AmazonLinux3 server. The error I got was - Libicu's dependencies is missing for Dotnet Core 6.0 Execute sudo ./bin/installdependencies.sh to install any missing Dotnet Core 6.0 dependencies. and it got fixed by installing libicu

yum install libicu -y

davi020 avatar Jun 21 '24 02:06 davi020