0

I am trying to install some programs, but I met with unmet dependencies. For example, sudo apt-get upgrade yields:

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

sudo apt --fix-broken install gives:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  chromium-codecs-ffmpeg-extra gstreamer1.0-vaapi libclang-common-12-dev libclang-cpp12 libclang1-12 libfwupdplugin1 libgstreamer-plugins-bad1.0-0 libllvm11 libva-wayland2 llvm-12-tools
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 3 not upgraded.
2 not fully installed or removed.
Need to get 0 B/191 kB of archives.
After this operation, 845 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 206816 files and directories currently installed.)
Preparing to unpack .../linux-tools-common_5.4.0-122.138_all.deb ...
Unpacking linux-tools-common (5.4.0-122.138) ...
dpkg: error processing archive /var/cache/apt/archives/linux-tools-common_5.4.0-122.138_all.deb (--unpack):
 trying to overwrite '/usr/bin/acpidbg', which is also in package linux-intel-iotg-5.15-tools-common 5.15.0-1010.14~20.04.1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/linux-tools-common_5.4.0-122.138_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I have no idea how to fix this.

Roman
  • 1
  • There are a couple of ways to approach this. You can force the overwrite, or you can remove the package that has the other version of the files. In you case this would mean removing the linux-intel-iotg tools package (at least). – Charles Green Jul 28 '22 at 17:05
  • Thanks, @CharlesGreen, for your answer. But when I'm trying to run sudo apt remove linux-intel-iotg-5.15-tools-common it still gives error about unmet dependencies. – Roman Jul 29 '22 at 07:29
  • It turned out that answer already was here: https://askubuntu.com/questions/176121/dpkg-error-trying-to-overwrite-file-which-is-also-in. So after running sudo dpkg -i --force-overwrite /var/cache/apt/archives/linux-tools-common_5.4.0-122.138_all.deb the problem was solved. – Roman Jul 29 '22 at 07:38

0 Answers0