E: Unmet dependencies. Try ‘apt --fix-broken install‘ with no packages (or specify a solution).

ubuntu 安装 dos2unix的时候提示 出错

# apt install dos2unix
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-tools-5.4.0-139 : 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).

提示需要 执行 apt --fix-broken install ,安装提示执行

root@1:~/HCCB/nlp/tools# apt --fix-broken install
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:
  apport-symptoms python3-apport python3-problem-report python3-systemd
Use '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 62 not upgraded.
3 not fully installed or removed.
Need to get 0 B/216 kB of archives.
After this operation, 903 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 83575 files and directories currently installed.)
Preparing to unpack .../linux-tools-common_5.4.0-139.156_all.deb ...
Unpacking linux-tools-common (5.4.0-139.156) ...
dpkg: error processing archive /var/cache/apt/archives/linux-tools-common_5.4.0-139.156_all.deb (--unpack):
 trying to overwrite '/usr/bin/acpidbg', which is also in package linux-intel-iotg-5.15-tools-common 5.15.0-1025.30~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-139.156_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

E: Unmet dependencies. Try ‘apt --fix-broken install‘ with no packages (or specify a solution)._第1张图片
提示这个文件冲突 /var/cache/apt/archives/linux-tools-common_5.4.0-144.161_all.deb
我这里选择覆盖安装对应冲突的文件

dpkg -i --force-overwrite /var/cache/apt/archives/linux-tools-common_5.4.0-144.161_all.deb

重新更新一下apt

sudo apt-get update
sudo apt-get upgrade

重新安装 问题解决

apt install dos2unix
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  apport-symptoms python3-apport python3-problem-report python3-systemd
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  dos2unix
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 374 kB of archives.
After this operation, 1,342 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu focal/universe amd64 dos2unix amd64 7.4.0-2 [374 kB]
Fetched 374 kB in 2s (209 kB/s)
Selecting previously unselected package dos2unix.
(Reading database ... 83800 files and directories currently installed.)
Preparing to unpack .../dos2unix_7.4.0-2_amd64.deb ...
Unpacking dos2unix (7.4.0-2) ...
Setting up dos2unix (7.4.0-2) ...
Processing triggers for man-db (2.9.1-1) ...



dos2unix -V
dos2unix 7.4.0 (2017-10-10)
With Unicode UTF-16 support.
With native language support.
With support to preserve the user and group ownership of files.
LOCALEDIR: /usr/share/locale
http://waterlan.home.xs4all.nl/dos2unix.html


你可能感兴趣的:(linux,ubuntu,python)