2017-10-22 83 views
-1

當我試圖在Apline3.5上安裝readelf包時,我收到了此錯誤消息。高山linux:readelf(缺失)。如何在Alpine Linux上安裝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來做到這一點。 我該怎麼辦?

+0

Stack Overflow是用於編程和發展問題的站點。這個問題似乎與題目無關,因爲它不涉及編程或開發。請參閱幫助中心的[我可以詢問哪些主題](http://stackoverflow.com/help/on-topic)。也許[超級用戶](http://superuser.com/)或[Unix&Linux堆棧交換](http://unix.stackexchange.com/)會是一個更好的地方。 – jww

回答

1

您需要使用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