[Bug 2145034] [NEW] py3compile fails due to LD_PRELOAD ='' in environment (in some cases)

Paul Cosway 2145034 at bugs.launchpad.net
Fri Mar 20 14:30:08 UTC 2026


Public bug reported:

System:   Samsung Galaxy S6 running Android 7.0, with fresh install of
Termux 0.118.3

When I install python using pkg install python I get the following error:
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/py3compile", line 323, in <module>
    main()
    ~~~~^^
  File "/data/data/com.termux/files/usr/bin/py3compile", line 284, in main
    pkg_files = tuple(dpf.from_package(options.package))
  File "/data/data/com.termux/files/usr/lib/python3.13/debpython/files.py", line 85, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of python

Same messages also appear for python-pip.

Note:  I don't actually know if this creates a problem with the
installation!  I assume that it must, as files.py is not returning the
expected results.

I have tested several changes to files.py and determined that the cause
of the error seems to be the line:  env["LD_PRELOAD"] = "".   If I
remove that, the install works fine.

I have done the same installation on a Lenovo tablet running Android 11
and it works fine, so the LD_PRELOAD is not always a problem.   I do not
know enough to have any theory about why it causes a problem on the
Android 7 device.   I have done factory resets and several reinstalls of
Termux and always get the same problem from files.py.

** Affects: python3-defaults (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/2145034

Title:
  py3compile fails due to LD_PRELOAD ='' in environment (in some cases)

Status in python3-defaults package in Ubuntu:
  New

Bug description:
  System:   Samsung Galaxy S6 running Android 7.0, with fresh install of
  Termux 0.118.3

  When I install python using pkg install python I get the following error:
  Traceback (most recent call last):
    File "/data/data/com.termux/files/usr/bin/py3compile", line 323, in <module>
      main()
      ~~~~^^
    File "/data/data/com.termux/files/usr/bin/py3compile", line 284, in main
      pkg_files = tuple(dpf.from_package(options.package))
    File "/data/data/com.termux/files/usr/lib/python3.13/debpython/files.py", line 85, in from_package
      raise Exception("cannot get content of %s" % package_name)
  Exception: cannot get content of python

  Same messages also appear for python-pip.

  Note:  I don't actually know if this creates a problem with the
  installation!  I assume that it must, as files.py is not returning the
  expected results.

  I have tested several changes to files.py and determined that the
  cause of the error seems to be the line:  env["LD_PRELOAD"] = "".   If
  I remove that, the install works fine.

  I have done the same installation on a Lenovo tablet running Android
  11 and it works fine, so the LD_PRELOAD is not always a problem.   I
  do not know enough to have any theory about why it causes a problem on
  the Android 7 device.   I have done factory resets and several
  reinstalls of Termux and always get the same problem from files.py.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/2145034/+subscriptions




More information about the foundations-bugs mailing list