我尝试从容器中给出以下命令并发现以下问题,可能是因为" -moby"内核版本。我们不能得到一个没有单词的码头图像" -moby"进入Linux内核版本。
我尝试在拥有ubuntu的VM上安装linux perf工具,但它确实有效。
#docker run -t -i ubuntu:14.04 /bin/bash
root@214daea94f4f:/# perf
WARNING: perf not found for kernel 4.9.41
You may need to install the following packages for this specific kernel:
linux-tools-4.9.41-moby
linux-cloud-tools-4.9.41-moby
You may also want to install one of the following packages to keep up to date:
linux-tools-moby-lts-<series>
linux-cloud-tools-moby-lts-<series>
答案 0 :(得分:7)
只是做
apt-get install linux-tools-generic
并创建/ usr / bin / perf的符号链接。 (在我的情况下):
ln -s /usr/lib/linux-tools/3.13.0-141-generic/perf /usr/bin/perf
它对我有用!
答案 1 :(得分:0)
在debian buster-slim中,我使用了:
apt-get install linux-perf