【发布时间】:2022-10-06 01:04:35
【问题描述】:
我试图分析一些我需要perf 的程序。它没有安装,所以当我尝试使用我的可执行文件启动 (perf stat ./part1) 它时,我得到了:
Command \'perf\' not found, but can be installed with:
sudo apt install linux-intel-iotg-tools-common # version 5.15.0-1015.20, or
sudo apt install linux-nvidia-tools-common # version 5.15.0-1005.5
sudo apt install linux-tools-common # version 5.15.0-48.54
然后我做了sudo apt install linux-intel-iotg-tools-common,它正确终止了。然后当再次执行perf stat ./part1 时,我得到了以下信息:
WARNING: perf not found for kernel 5.17.15-76051715
You may need to install the following packages for this specific kernel:
linux-tools-5.17.15-76051715-generic
linux-cloud-tools-5.17.15-76051715-generic
You may also want to install one of the following packages to keep up to date:
linux-tools-generic
linux-cloud-tools-generic
然后我执行sudo apt install linux-tools-generic 并得到以下错误:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
linux-tools-5.19.0-76051900 linux-tools-5.19.0-76051900-generic
linux-tools-common
The following NEW packages will be installed:
linux-tools-5.19.0-76051900 linux-tools-5.19.0-76051900-generic
linux-tools-common linux-tools-generic
0 upgraded, 4 newly installed, 0 to remove and 25 not upgraded.
Need to get 8,558 kB of archives.
After this operation, 28.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://apt.pop-os.org/release jammy/main amd64 linux-tools-common all 5.19.0-76051900.202207312230~1663791054~22.04~28340d4 [229 kB]
Get:2 http://apt.pop-os.org/release jammy/main amd64 linux-tools-5.19.0-76051900 amd64 5.19.0-76051900.202207312230~1663791054~22.04~28340d4 [8,325 kB]
Get:3 http://apt.pop-os.org/release jammy/main amd64 linux-tools-5.19.0-76051900-generic amd64 5.19.0-76051900.202207312230~1663791054~22.04~28340d4 [2,164 B]
Get:4 http://apt.pop-os.org/release jammy/main amd64 linux-tools-generic amd64 5.19.0.76051900.202207312230~1663791054~22.04~28340d4 [1,888 B]
Fetched 8,558 kB in 0s (24.0 MB/s)
Selecting previously unselected package linux-tools-common.
(Reading database ... 235995 files and directories currently installed.)
Preparing to unpack .../linux-tools-common_5.19.0-76051900.202207312230~16637910
54~22.04~28340d4_all.deb ...
Unpacking linux-tools-common (5.19.0-76051900.202207312230~1663791054~22.04~2834
0d4) ...
dpkg: error processing archive /var/cache/apt/archives/linux-tools-common_5.19.0
-76051900.202207312230~1663791054~22.04~28340d4_all.deb (--unpack):
trying to overwrite \'/usr/bin/acpidbg\', which is also in package linux-intel-io
tg-tools-common 5.15.0-1015.20
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package linux-tools-5.19.0-76051900.
Preparing to unpack .../linux-tools-5.19.0-76051900_5.19.0-76051900.202207312230
~1663791054~22.04~28340d4_amd64.deb ...
Unpacking linux-tools-5.19.0-76051900 (5.19.0-76051900.202207312230~1663791054~2
2.04~28340d4) ...
Selecting previously unselected package linux-tools-5.19.0-76051900-generic.
Preparing to unpack .../linux-tools-5.19.0-76051900-generic_5.19.0-76051900.2022
07312230~1663791054~22.04~28340d4_amd64.deb ...
Unpacking linux-tools-5.19.0-76051900-generic (5.19.0-76051900.202207312230~1663
791054~22.04~28340d4) ...
Selecting previously unselected package linux-tools-generic.
Preparing to unpack .../linux-tools-generic_5.19.0.76051900.202207312230~1663791
054~22.04~28340d4_amd64.deb ...
Unpacking linux-tools-generic (5.19.0.76051900.202207312230~1663791054~22.04~283
40d4) ...
Errors were encountered while processing:
/var/cache/apt/archives/linux-tools-common_5.19.0-76051900.202207312230~1663791
054~22.04~28340d4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
从现在开始,任何对sudo apt-get upgrade 的调用都会失败。我没有尝试过任何太花哨的命令,因为我认为我错过了一些东西。 sudo dpkg --configure -a 的输出产生以下结果:
dpkg: dependency problems prevent configuration of linux-tools-5.19.0-76051900:
linux-tools-5.19.0-76051900 depends on linux-tools-common; however:
Package linux-tools-common is not installed.
dpkg: error processing package linux-tools-5.19.0-76051900 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-tools-5.19.0-76051900-generic:
linux-tools-5.19.0-76051900-generic depends on linux-tools-5.19.0-76051900; however:
Package linux-tools-5.19.0-76051900 is not configured yet.
dpkg: error processing package linux-tools-5.19.0-76051900-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-tools-generic:
linux-tools-generic depends on linux-tools-5.19.0-76051900-generic (= 5.19.0-76051900.202207312230~1663791054~22.04~28340d4); however:
Package linux-tools-5.19.0-76051900-generic is not configured yet.
dpkg: error processing package linux-tools-generic (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-tools-5.19.0-76051900
linux-tools-5.19.0-76051900-generic
linux-tools-generic
我试图清除和删除所有这些包(不强制标志),但它总是失败,我害怕破坏一些东西。我很困惑。如何删除这些包并恢复到包管理器之前的健康状态?
提前致谢。
-
我跑了
sudo dpkg -P linux-intel-iotg-tools-common和sudo apt --fix-broken install,它似乎是固定的......