Non Portable binary, doesn't work with sudo or without LD_LIBRARY_PATH
@v-priya-kinthali 已經在處理了。
開始於 2024年7月10日。
評估
這個 Issue 還沒有評估資料。
描述
Description:
Python binary is compiled with rpath that's /opt/hostedtoolcache/Python. Now, latest github runners define RUNNER_TOOL_CACHE/AGENT_TOOLSDIRECTORY differently than /opt/hostedtoolcache and that installs python at /home/runner/_work/_tool/Python/. So, with this, there are 2 issues.
sudo python --versiondoesn't work ( See Error section) because most systems's doesn't allow passing LD_LIBRARY_PATH due to security issues.python --versiondoesn't work without setting environment variable LD_LIBRARY_PATH
output of ldd :
runner@arss-runner-xxxx-runner-5jvhz:~/_work/_tool/Python/3.12.3/x64/bin$ ldd python3
linux-vdso.so.1 (0x00007ffceb776000)
libpython3.12.so.1.0 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7ccc75c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7ccc991000)
Error:
python: error while loading shared libraries: libpython3.9.so.1.0:
cannot open shared object file: No such file or directory
What could be the reason:
rpath is hardcoded to /opt/hostedtoolcache/Python. if we use $ORIGIN, binaries will be portable. Fix is raised here https://github.com/actions/python-versions/pull/275
Action version:
v5.1.0
Platform:
- Ubuntu
- macOS
- Windows
Runner type:
- Hosted
- Self-hosted
Tools version:
All versions of Python 3.9.x, 3.10.x, etc.
Repro steps:
You can easily reproduce using following steps. And also, you can unset LD_LIBRARY_PATH and just use without sudo
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: |
sudo python --version
Expected behavior:
There are times we need to use sudo python and Most system ( also not acceptable to pass) doesn't pass LD_LIBRARY_PATH as environment variable due to security issues.
Actual behavior:
sudo python --version to work.
- 主要語言
- TypeScript
- 星號
- 2.2k
- 分支
- 739
- 平均合併
- 6 天 18 小時
- 30 天內合併 PR
- 1
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
actions/setup-python 的其他 Issue
-
bug
難度 4/5 3-5 天 新手友好度 55/100
actions/setup-python#1348 · 5 則留言 ·
-
feature request
難度 5/5 一週以上 新手友好度 35/100
actions/setup-python#1346 · 12 則留言 ·
-
feature request
難度 3/5 1-2 天 新手友好度 58/100
actions/setup-python#1308 · 8 則留言 ·
-
feature request
難度 2/5 1-3 小時 新手友好度 35/100
actions/setup-python#1301 · 5 則留言 ·
-
feature request
難度 4/5 3-5 天 新手友好度 55/100
actions/setup-python#1294 · 3 則留言 · 2 個 reaction ·
查看 actions/setup-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
bug v2
難度 2/5 1-3 小時 新手友好度 75/100
modelcontextprotocol/inspector#2458 · 1 則留言 ·
-
難度 1/5 1 小時以內 新手友好度 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
難度 2/5 1-3 小時 新手友好度 70/100
carbon-design-system/ibm-products#9907 ·