self-hosted tools cache setup not working automatically on Linux & Mac with v2
See original GitHub issueHi, I am getting Version 2.x with arch x64 not found
error message from my self-hosted runner on ubuntu 18.04. However, I can see that version 2.7.18
is in the versions-manifest.json file.
Run actions/setup-python@v2
Version 2.x was not found in the local cache
Version 2.x is available for downloading
Download from "https://github.com/actions/python-versions/releases/download/2.7.18-20200429.22/python-2.7.18-ubuntu-1804-x64.tar.gz"
Extract downloaded archive
/bin/tar xz --warning=no-unknown-keyword -C ./7ab082fa-bc6a-4a50-9c0e-bb389ac0bcfd -f /home/runner/actions-runner/_work/_temp/7ab082fa-bc6a-4a50-9c0e-bb389ac0bcfd
Execute installation script
##[error]Version 2.x with arch x64 not found
The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/master/versions-manifest.json
manifest.json
{
"version": "2.7.17",
"stable": true,
"release_url": "https://github.com/actions/python-versions/releases/tag/2.7.17-20200429.31",
"files": [
{
"filename": "python-2.7.17-macos-1014-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"platform_version": "10.14",
"download_url": "https://github.com/actions/python-versions/releases/download/2.7.17-20200429.31/python-2.7.17-macos-1014-x64.tar.gz"
},
{
"filename": "python-2.7.17-macos-1014-x64.tar.gz",
"arch": "x64",
"platform": "darwin",
"platform_version": "10.15",
"download_url": "https://github.com/actions/python-versions/releases/download/2.7.17-20200429.31/python-2.7.17-macos-1014-x64.tar.gz"
},
{
"filename": "python-2.7.17-ubuntu-1604-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "16.04",
"download_url": "https://github.com/actions/python-versions/releases/download/2.7.17-20200429.31/python-2.7.17-ubuntu-1604-x64.tar.gz"
},
{
"filename": "python-2.7.17-ubuntu-1804-x64.tar.gz",
"arch": "x64",
"platform": "linux",
"platform_version": "18.04",
"download_url": "https://github.com/actions/python-versions/releases/download/2.7.17-20200429.31/python-2.7.17-ubuntu-1804-x64.tar.gz"
},
{
"filename": "python-2.7.17-windows-2016-x64.zip",
"arch": "x64",
"platform": "win32",
"download_url": "https://github.com/actions/python-versions/releases/download/2.7.17-20200429.31/python-2.7.17-windows-2016-x64.zip"
},
{
"filename": "python-2.7.17-windows-2016-x86.zip",
"arch": "x86",
"platform": "win32",
"download_url": "https://github.com/actions/python-versions/releases/download/2.7.17-20200429.31/python-2.7.17-windows-2016-x86.zip"
}
]
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
Top Results From Across the Web
self-hosted tools cache setup not working automatically on ...
Run actions/setup-python@v2 Version 3.8 was not found in the local cache Version 3.8 is available for downloading Download from ...
Read more >Mattermost self-hosted changelog
Mattermost is an open source platform for secure collaboration across the entire software development lifecycle. This changelog summarizes updates for the ...
Read more >Deploy a registry server - Docker Documentation
Before you can deploy a registry, you need to install Docker on the host. A registry is an instance of the registry image,...
Read more >Install GitLab Runner
Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner.
Read more >GitKraken Client FAQs | Answers to Common Questions
Answers to FAQs about GitKraken Client regarding integrations, technical issues, and other support related questions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So getting this to work automatically on Mac and Linux is going to require some extra steps. I’m working on updating the
README
with a easy(ish) guide on how to do this after I figure out the last step to this puzzle.There are a couple of things going on here.
AGENT_TOOLSDIRECTORY
env variable needs to be set to/opt/hostedtoolcache
(on Linux at least, different on Mac). We compile Python in this directory with--enable-shared
so it is non-portable and it has to always be located in the same place (see here). If the path is different you’ll get an error likeerror while loading shared libraries: libpython3.7m.so.1.0
when reaching the end ofsetup.sh
/opt/hostedtoolcache
directory, you need to be running assudo
to modify this. However, if you’re tried starting the runner with sudo, you’ll get an error that saysMust not run interactively with sudo
. To get around this, you have to configure passwordless sudo which is what our hosted runners dosetup.sh
file that is downloaded so that all that necessary commands likemkdir
run withsudo
or so thatsetup-python
does all the necessary magic behind the scenes (what i’m trying to get working)This looks like the local tools cache setup isn’t working for the first time when running on linux?
The download appears to be fine, however, the setup script must be running into some issues. Investigating… (most likely an env variable isn’t set or something)
Edit: If you set an env variable called
AGENT_TOOLSDIRECTORY
with something such asexport AGENT_TOOLSDIRECTORY=~
it will almost successfully set everything up. Still figuring out why it doesn’t work…If the value is set to
~
, it would create a directory~/Python
and everything would be copied over and setup in there.