首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在linux上安装GitHub actions runner

无法在linux上安装GitHub actions runner
EN

Stack Overflow用户
提问于 2021-01-24 06:09:28
回答 3查看 1.7K关注 0票数 6

我正在尝试按照repo>settings>Actions>add runner中描述的步骤在我的Linux机器(Ubuntu20.04.1LTS)上安装GitHub runner。第一步运行得很好,但当我运行配置时:

./config.sh --url <repo URL> --token <token>

我得到以下失败消息:

代码语言:javascript
复制
ldd: ./bin/libSystem.Security.Cryptography.Native.OpenSsl.so: No such file or directory
ldd: ./bin/libSystem.IO.Compression.Native.so: No such file or directory
touch: cannot touch '.env': Permission denied
./env.sh: line 37: .path: Permission denied
./env.sh: line 32: .env: Permission denied
Unhandled exception. System.UnauthorizedAccessException: Access to the path '/actions-runner/_diag' is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at System.IO.FileSystem.CreateDirectory(String fullPath)
   at System.IO.Directory.CreateDirectory(String path)
   at GitHub.Runner.Common.HostTraceListener..ctor(String logFileDirectory, String logFilePrefix, Int32 pageSizeLimit, Int32 retentionDays)
   at GitHub.Runner.Common.HostContext..ctor(String hostType, String logFile)
   at GitHub.Runner.Listener.Program.Main(String[] args)
./config.sh: line 76: 10405 Aborted                 (core dumped) ./bin/Runner.Listener configure "$@"

config.sh不允许用户以sudo身份执行它,所以我修改了脚本以允许这样做,但权限问题仍然存在。有什么想法吗?

更新:我还通过在/actions-runner目录中运行以下命令安装了依赖项,但没有任何更改,错误消息仍然是相同的。

sudo ./bin/installdependencies.sh

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2021-01-27 06:20:39

根据@someone的回答,我创建了一个快速循环,为github action runners的bin目录中的每一个重命名的库创建符号链接。在运行installdependencies.sh脚本之后,它会为每个以“System”开头的文件创建一个符号链接。并将"lib“附加到原始文件名。

代码语言:javascript
复制
sudo ./bin/installdependencies.sh \
   && cd ./bin \
   && for lib in $(find . -name 'System.*'); do \
     toFile=$(echo "$lib" | sed -e 's/\.\/System\./.\/libSystem./g'); \
     if ! [ -f $toFile ]; then sudo ln -s $lib $toFile; fi; \
  done && cd ..
票数 1
EN

Stack Overflow用户

发布于 2021-03-04 00:50:12

上面的解决方案对我不起作用,我安装了一个旧版本而不是2.276.1。对于linux 64位操作系统,curl命令为:

代码语言:javascript
复制
curl -O -L https://github.com/actions/runner/releases/download/v2.276.1/actions-runner-linux-x64-2.276.1.tar.gz
票数 3
EN

Stack Overflow用户

发布于 2021-01-25 00:44:21

该问题与.NET依赖项有关。GitHub运行程序使用的是3.x版本,而最新的版本(也就是我安装的版本)是5。在较新的版本中,这些库被重命名,没有前面的"lib“。有关该here的更多详细信息

.NET 3.x:

代码语言:javascript
复制
libSystem.Security.Cryptography.Native.OpenSsl.so
libSystem.IO.Compression.Native.so

.NET 5.x

代码语言:javascript
复制
System.Security.Cryptography.Native.OpenSsl.so
System.IO.Compression.Native.so

解决方案:

1-安装.NET 3.x Installation guide

2-创建一个符号链接,通过旧的符号链接访问新的符号链接:

代码语言:javascript
复制
ln -s /usr/share/dotnet/shared/Microsoft.NETCore.App/5.0.1/libSystem.Security.Cryptography.Native.OpenSsl.so /usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.10/libSystem.Security.Cryptography.Native.OpenSsl.so

ln -s /usr/share/dotnet/shared/Microsoft.NETCore.App/5.0.1/libSystem.Security.Cryptography.Native.OpenSsl.a /usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.10/libSystem.Security.Cryptography.Native.OpenSsl.a
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65864951

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档