perf
我正在尝试在我的 Ubuntu 服务器上安装。为了安装linux-tools
,我尝试了linux-tools-generic
,linux-tools-generic-hwe-20.04-edge
但linux-tools-5.15.0-69-generic
每次都出现此错误:
Unpacking linux-tools-common (5.4.0-146.163) ...
dpkg: error processing archive /var/cache/apt/archives/linux-tools-common_5.4.0-146.163_all.deb (--unpack):
trying to overwrite '/usr/bin/perf', which is also in package linux-base 4.6
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package linux-tools-5.4.0-146.
Preparing to unpack .../linux-tools-5.4.0-146_5.4.0-146.163_amd64.deb ...
Unpacking linux-tools-5.4.0-146 (5.4.0-146.163) ...
Selecting previously unselected package linux-tools-5.4.0-146-generic.
Preparing to unpack .../linux-tools-5.4.0-146-generic_5.4.0-146.163_amd64.deb ...
Unpacking linux-tools-5.4.0-146-generic (5.4.0-146.163) ...
Selecting previously unselected package linux-tools-generic.
Preparing to unpack .../linux-tools-generic_5.4.0.146.144_amd64.deb ...
Unpacking linux-tools-generic (5.4.0.146.144) ...
Errors were encountered while processing:
/var/cache/apt/archives/linux-tools-common_5.4.0-146.163_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我的内核:
uname -r
5.15.0-69-generic
据我所知,我尝试安装的linux-tools-5.4.0-146
版本不正确。我找不到此包5.15.0-69-generic
。
有什么想法可以在不升级到 22.04 的情况下在我的机器上获得性能吗?
我看到linux-tools-5.15.0-69
有可用功能,jammy
但是没能安装它。
sudo apt-cache search linux-tools-common
linux-tools-common - Linux kernel version specific tools for version 5.4.0
有机会在某处找到linux-tools-common
5.15 吗?
答案1
linux-tools-common
这看上去像是包与包之间的包冲突linux-base
。
解决方法如下:首先打开终端,然后使用 删除linux-tools-common
,sudo apt remove linux-tools-common
然后使用linux-tools
安装sudo apt install linux-tools-generic
检查 perf 是否已安装并且已完成perf --version