Score:0

Unable to install linux-tools for perf

bd flag

I want to use Perf, so I tried to install linux-tools-common with the command:

sudo apt install linux-tools-common

However I got this error message:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.19.0-35-generic linux-hwe-5.19-headers-5.19.0-35 linux-image-5.19.0-35-generic linux-modules-5.19.0-35-generic
  linux-modules-extra-5.19.0-35-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  linux-tools-common
0 upgraded, 1 newly installed, 0 to remove and 168 not upgraded.
3 not fully installed or removed.
Need to get 0 B/277 kB of archives.
After this operation, 833 kB of additional disk space will be used.
(Reading database ... 463754 files and directories currently installed.)
Preparing to unpack .../linux-tools-common_5.15.0-73.80_all.deb ...
Unpacking linux-tools-common (5.15.0-73.80) ...
dpkg: error processing archive /var/cache/apt/archives/linux-tools-common_5.15.0-73.80_all.deb (--unpack):
 trying to overwrite '/usr/bin/acpidbg', which is also in package linux-intel-iotg-tools-common 5.15.0-1030.35
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-tools-common_5.15.0-73.80_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to solve the problem by following the advice in the error message:

sudo apt autoremove

Which let to the next error message:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-tools-5.15.0-73 : Depends: linux-tools-common but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

After running: sudo apt --fix-broken install, I get the same error message as before:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  linux-headers-5.19.0-35-generic linux-hwe-5.19-headers-5.19.0-35 linux-image-5.19.0-35-generic linux-modules-5.19.0-35-generic
  linux-modules-extra-5.19.0-35-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-tools-common
The following NEW packages will be installed:
  linux-tools-common
0 upgraded, 1 newly installed, 0 to remove and 168 not upgraded.
3 not fully installed or removed.
Need to get 0 B/277 kB of archives.
After this operation, 833 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 463754 files and directories currently installed.)
Preparing to unpack .../linux-tools-common_5.15.0-73.80_all.deb ...
Unpacking linux-tools-common (5.15.0-73.80) ...
dpkg: error processing archive /var/cache/apt/archives/linux-tools-common_5.15.0-73.80_all.deb (--unpack):
 trying to overwrite '/usr/bin/acpidbg', which is also in package linux-intel-iotg-tools-common 5.15.0-1030.35
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-tools-common_5.15.0-73.80_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I am using Ubuntu 22.04.2 LTS on a 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz × 8 Processor.

EDIT: I tried to install: perf-tools-unstable, but still get the same error message:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-tools-5.15.0-73 : Depends: linux-tools-common but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

SECOND EDIT: My repository configurations are:

$ apt-cache policy | grep http | awk '{print $2" "$3}' | sort -u
http://de.archive.ubuntu.com/ubuntu jammy-backports/main
http://de.archive.ubuntu.com/ubuntu jammy-backports/universe
http://de.archive.ubuntu.com/ubuntu jammy/main
http://de.archive.ubuntu.com/ubuntu jammy/multiverse
http://de.archive.ubuntu.com/ubuntu jammy/restricted
http://de.archive.ubuntu.com/ubuntu jammy/universe
http://de.archive.ubuntu.com/ubuntu jammy-updates/main
http://de.archive.ubuntu.com/ubuntu jammy-updates/multiverse
http://de.archive.ubuntu.com/ubuntu jammy-updates/restricted
http://de.archive.ubuntu.com/ubuntu jammy-updates/universe
https://apt.syncthing.net syncthing/stable
https://dl.google.com/linux/chrome/deb stable/main
https://download.docker.com/linux/ubuntu jammy/stable
http://security.ubuntu.com/ubuntu jammy-security/main
http://security.ubuntu.com/ubuntu jammy-security/multiverse
http://security.ubuntu.com/ubuntu jammy-security/restricted
http://security.ubuntu.com/ubuntu jammy-security/universe
https://ppa.launchpadcontent.net/jonmagon/crow-translate/ubuntu jammy/main
https://ppa.launchpadcontent.net/linuxuprising/java/ubuntu jammy/main
https://repo.steampowered.com/steam stable/steam
Sadaharu Wakisaka avatar
pl flag
Welcome to AskUbuntu. Have you tried [this](https://installati.one/install-perf-tools-unstable-ubuntu-22-04/)?
marcel fiedler avatar
bd flag
I did not know about this! Does perf-tools-unstable have the same functionalities as the regular perf from the linux-tools package?@SadaharuWakisaka ?
kanehekili avatar
zw flag
Why is someone proposing an "unstable" version? I would not recommend installing it. The output looks like some invalid or old repository has been added. linux-tools can be installed without any problems - if not using some "unstable" software. Please list your repository configuration using `apt-cache policy | grep http | awk '{print $2" "$3}' | sort -u`. Paste the result of that command on your question, **not** in the comments
marcel fiedler avatar
bd flag
Thank you for your advice, here's my rep conf @kanehekili
Sadaharu Wakisaka avatar
pl flag
I have no idea, the google search returned unstable version. For me, the packages in the apt are trustworthy.
Score:0
zw flag

You have installed acpidebug with its package linux-intel-iotg-tools-common which probably comes from one of the ppas or "foreign" repositories. So it clashes with the perf-tools (unstable or stable) package. You'll need to remove it before installing the latter package

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.