Skip to content

Ubuntu 20.10: references to old Ubuntu packages #188

Description

@tobiasdiez

Describe the bug
On Ubuntu 20.10 the Python installation is referencing some old Ubuntu packages that are missing. In more detail, if used with

container: 
      image: ubuntu:20.10

then one gets errors such as

     Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/setuptools/__init__.py", line 18, in <module>
        from setuptools.dist import Distribution
      File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/_virtualenv.py", line 89, in exec_module
        old(module)
      File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/setuptools/dist.py", line 32, in <module>
        from setuptools import windows_support
      File "/__w/sagetrac-mirror/sagetrac-mirror/src/.venv/lib/python3.8/site-packages/setuptools/windows_support.py", line 2, in <module>
        import ctypes
      File "/__t/Python/3.8.7/x64/lib/python3.8/ctypes/__init__.py", line 7, in <module>
        from _ctypes import Union, Structure, Array
    ImportError: libffi.so.6: cannot open shared object file: No such file or directory

or

import readline
ImportError: libreadline.so.7: cannot open shared object file: No such file or directory

These can be fixed by manually downloading the corresponding packages from the old Ubuntu distribution, e.g. bionic.

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

If applicable, please specify if you're using a container: ubuntu:20.10

Python Versions
3.8 and 3.9, at least

To Reproduce
Steps to reproduce the behavior:

  1. Use setup-python in a ubuntu:20.10 container
  2. Import something from _ctypes or readline
  3. Get error

Run/Repo Url
https://github.com/sagemath/sagetrac-mirror/runs/1870813916?check_suite_focus=true
and
https://github.com/sagemath/sagetrac-mirror/runs/1862181456?check_suite_focus=true

Activity

  1. avihaybar commented on Sep 20, 2021

    @avihaybar

    ImportError: libffi.so.6: cannot open shared object file: No such file or directory

    This happens to me on Ubuntu 20.04 LTS too with Python 3.8.
    I did notice that the cached Python version for 3.8 is 3.8.11 which probably disregard the platform version.
    Pinning down the version to 3.8.12 is downloading the correct python-3.8.12-linux-20.04-x64.tar.gz .
    Ubuntu 20.04 and later uses the updated libffi.so.7 while the cached Python version is looking for libffi.so.6.
    see more info here

  2. self-assigned this
    on Jun 23, 2022
  3. dsame commented on Jun 27, 2022

    @dsame
    Contributor

    Hello @avihaybar,

    The solution suggested by @illia-v is to be discussed and it can take a lot of time. Meanwhile, i suggest you to install the required library manually, will it work for you? Do you need our help to install those libraries within your pipeline?

  4. avihaybar commented on Jun 27, 2022

    @avihaybar

    thanks for the reply, @dsame.
    We have since upgraded internally to Python 3.9.x where the issue is resolved.

  5. dsame commented on Jun 27, 2022

    @dsame
    Contributor

    Thanks @avihaybar for your note. i am going to close this. Feel free to open new issue or reopen this one in case of any problem

  6. dsame commented on Jun 27, 2022

    @dsame
    Contributor

    the same root cause leads to the SEGAULT #442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions