Jan*_*sen 7 linux runtime-error
我需要mksdcard从 Android SDK 使用它。目前,当我运行该可执行文件时,系统报告“没有这样的文件或目录”。
对于 Debian,可以安装 ia32-libs。在 Ubuntu 上,该包名为libc6-i386.
如何/lib/ld-linux.so.2在 NixOS 上获取文件?
NixOS 本身不支持多架构。
唯一包含 32 位 ELF 解释器ld-linux.so.2文件的 Nix 软件包是 i386 版本的 glibc。
幸运的是,我们可以通过借用 debian 的软件包来解决这个问题。
dpkg:nix-env -i dpkglibc-i38664 位系统的软件包:curl -O http://ftp.us.debian.org/debian/pool/main/e/eglibc/libc6-i386_2.11.3-4_amd64.debdpkg -x libc6-i386_2.11.3-4_amd64.deb libc6-i386mksdcard使用 32 位 ELF 解释器运行:./libc6-i386/lib32/ld-linux.so.2 /path/to/mksdcard能够运行mksdcardvia之类的东西的一种方法./mksdcard是使用patchelf安装的via来修补它们:nix-env -i patchelf
然后你可以做类似的事情patchelf --set--interpreter /path/to/libc6-i386/lib32/ld-linux.so.2 /path/to/mksdcard
否则,您可以尝试将符号链接放置在告诉您需要它们的ld-linux.so.2地方。ldd
[root@nixos:/tmp]# ./libc6-i386/lib32/ld-linux.so.2
Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM...]
You have invoked `ld.so', the helper program for shared library executables.
This program usually lives in the file `/lib/ld.so', and special directives
in executable files using ELF shared libraries tell the system's program
loader to load the helper program from this file. This helper program loads
the shared libraries needed by the program executable, prepares the program
to run, and runs it. You may invoke this helper program directly from the
command line to load and run an ELF executable file; this is like executing
that file itself, but always uses this helper program from the file you
specified, instead of the helper program file specified in the executable
file you run. This is mostly of use for maintainers to test new versions
of this helper program; chances are you did not intend to run this program.
--list list all dependencies and how they are resolved
--verify verify that given object really is a dynamically linked
object we can handle
--library-path PATH use given PATH instead of content of the environment
variable LD_LIBRARY_PATH
--inhibit-rpath LIST ignore RUNPATH and RPATH information in object names
in LIST
--audit LIST use objects named in LIST as auditors
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2323 次 |
| 最近记录: |