0

I am trying to install Ubuntu desktop on my Ubuntu 17.10 minimal. It installs fine until the point of installing wireless-tools which is a dependency that has to be installed.

The following error shows up trying to install it

Preparing to unpack .../wireless-tools_30~pre9-12ubuntu1_amd64.deb ...
Unpacking wireless-tools (30~pre9-12ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/wireless-tools_30~pre9-12ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/sbin/iwconfig', which is also in package wireless-tools-udeb 30~pre9-8ubuntu1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Selecting previously unselected package ubuntu-desktop.
Preparing to unpack .../ubuntu-desktop_1.404.1_amd64.deb ...
Unpacking ubuntu-desktop (1.404.1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/wireless-tools_30~pre9-12ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Trying to run sudo apt --fix-broken results in the same output.

Does anyone know what I should do?

I already tried to reboot and run sudo apt update and sudo apt upgrade

I already tried to purge it all and install again but comes with the same result.

I also already tried downloading the package manually and clearing the cache and install it that way but this resulted the same problem.

Lorenz Keel
  • 8,905

2 Answers2

0

Read the error message carefully:

dpkg: error processing archive /var/cache/apt/archives/wireless-tools_30~pre9-12ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/sbin/iwconfig', which is also in package wireless-tools-udeb 30~pre9-8ubuntu1

Lets break that down a bit:

dpkg: error processing archive A (--unpack): trying to overwrite 'FILE', which is also in package B

FILE can only be provided by one package at a time. When two packages (A and B) both try to provide FILE, the two packages conflict. You cannot have both installed at the same time.

Since you want A, you must uninstall B, or you must --force install A.

user535733
  • 62,253
0

I ended up downloading the latest deb from launchpad and then running sudo dpkg -i --force-overwrite wireless-tools_30~pre9-5ubuntu2_amd64.deb then sudo reboot and that made it work!