Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jalbstmeijer opened this issue Mar 29, 2023 · 7 comments · May be fixed by #3155
Open

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

jalbstmeijer opened this issue Mar 29, 2023 · 7 comments · May be fixed by #3155
Labels
bug Something isn't working

Comments

@jalbstmeijer
Copy link

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 jalbstmeijer added the bug Something isn't working label Mar 29, 2023
@softlberton
Copy link

softlberton commented Mar 29, 2023

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

@jalbstmeijer
Copy link
Author

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

@softlberton
Copy link

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
Copy link

WOW you are very fast and I appreciate that !!

I will be following closely.

@wassimrkik
Copy link

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.

stewartsmith added a commit to stewartsmith/runner that referenced this issue Feb 16, 2024
The /etc/os-release file has evolved over the years, with current
documentation being at
https://www.freedesktop.org/software/systemd/man/latest/os-release.html

Part of this spec is to also look at /usr/lib/os-release as image based
Linux distributions that can exist without anything in /etc may put the
os-release file there.

In the docs, Example 3 shows how to parse this file with shell. We can
use that example and look at ID_LIKE to better determine if the OS is a
Debian like system, or a Fedora like system, and differentiate between
how RHEL / CentOS and friends are like Fedora and how non-RHEL,
non-CentOS is also like Fedora.

The practical end-outcome of this is that it will now correctly detect
Amazon Linux 2023, pick 'dnf' as the package manager, and install the
dependencies.

Fixes: actions#2511
Signed-off-by: Stewart Smith <trawets@amazon.com>
@stewartsmith
Copy link

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

@softlberton
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants