阿尔派纳Linux:readelf(丢失)。如何在阿尔派纳Linux上安装readelf?

6

当我在Alpine3.5上尝试安装readelf软件包时,出现了以下错误信息。

$ apk add --no-cache readelf
client readelf
fetch http://dl-    cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  readelf (missing):
    required by: world[readelf]

我希望只使用一些命令来解决这个问题。
因为我想用Dockerfile来完成这件事情。 我该怎么做?


1
Stack Overflow是一个关于编程和开发问题的网站。这个问题似乎不属于编程或开发范畴。请参阅帮助中心中的我可以在这里问什么样的问题。也许超级用户Unix&Linux Stack Exchange更适合提问。 - jww
1个回答

22

您需要使用binutils软件包来实现相同的功能

$ apk add --update binutils
(1/2) Installing binutils-libs (2.28-r2)
(2/2) Installing binutils (2.28-r2)
Executing busybox-1.26.2-r5.trigger
OK: 13 MiB in 14 packages

$ readelf
Usage: readelf <option(s)> elf-file(s)
 Display information about the contents of ELF format files
 Options are:
  -a --all               Equivalent to: -h -l -S -s -r -d -V -A -I
  -h --file-header       Display the ELF file header
  -l --program-headers   Display the program headers

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接