question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to dynamically download and install manifests - library not found/path issue

See original GitHub issue

Describe the bug A clear and concise description of what the bug is.

Which version of the action are you using?

  • v1
  • v2
  • Some other tag (such as v2.0.1 or master)

Environment

  • self-hosted
  • Linux
  • Windows
  • Mac

Our self hosted runners are using a Ubuntu 18.04 base distro image.

Python Versions Please list all of the effected versions of Python (3.8.2, etc.)

  • 3.7.5
  • But really, any version which is not installed already to our self hosted runners.

To Reproduce Setup workflow with the following run action:

- name: Test Setup Python
   uses: actions/setup-python@v2
   with:
      python-version: '3.7.5'

The error received is:

Create Python 3.7.5 folder
Copy Python binaries to hostedtoolcache folder
Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action)
Upgrading PIP...
##[error]./python: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
##[error]The process '/bin/bash' failed with exit code 127

This is the same deal with other editions, during install the Python library can’t be located - I’m not sure if the issue lies with the Action itself, or the packaged Python installers from https://github.com/actions/python-versions that need modification.

I have been pre-loading specific Python versions to our self hosted runner - and in those cases I’ve been able to set LD_LIBRARY_PATH to get installs to take - not sure if this needs to be done by default for all manifests? Example, with a Python manifest downloaded and unzipped:

export LD_LIBRARY_PATH="/home/runner/_work/_tool/Python/3.7.5/x64/lib"
bash ./setup.sh

This will successfully install.

So I wonder, is the solution to append the installed library path to LD_LIBRARY_PATH in the context of ./setup.sh to provide a hint to pip where to locate required Python libs?

E.g. here: https://github.com/actions/python-versions/blob/ca3edf54460c3581d7285dd0fba82fa7d9215b6b/installers/nix-setup-template.sh#L51

Screenshots If applicable, add screenshots to help explain your problem.

Screen Shot 2020-08-14 at 10 40 01 pm

Additional context Feels somewhat related to #115

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
magnetikonlinecommented, Aug 28, 2020

Just to update - I’ve added a proposed PR fix to change how the manifest installers run/install here: https://github.com/actions/python-versions/pull/49

0reactions
polmcommented, Nov 3, 2020

Hello, the fix mentioned here seems to cause issues with other programs in the containers. In particular I ran into the issue that cloning git repos with https urls doesn’t work; see below for details.

https://github.com/pypa/manylinux/issues/812

I think the original LD_LIBRARY_PATH is getting lost at some point, is there some way to avoid that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Building and loading dynamic libraries at runtime in Swift
Learn how to create a plugin system using dynamic libraries and the power of Swift, aka. modular frameworks on the server-side.
Read more >
License Key - Unified Streaming
License Key¶. Table of Contents. Obtaining a license key; Unified Origin; Unified Capture; Unified Packager; Unified Remix; Installation Check; Features and ...
Read more >
Microsoft Visual Studio 2019: The project file cannot be ...
Unable to locate the .NET SDK. Check that it is installed and that the version specified in global.json (if any) matches the installed...
Read more >
Archived: TestStand 2010 and 2010 SP1 Known Issues by Date - NI
When you load the assembly in TestStand 2010, the .NET Adapter returns the error "Object reference not set to an instance of an...
Read more >
Packages - ament_cmake - ROS Index
a community-maintained index of robotics software.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found