Let’s see how to solve the problem of apt or dpkg failing to install packages due to errors like the following. This is happening because the new package you are trying to install is overwriting a file that is part of another installed package.
Sample Error Message
dpkg: error processing archive /tmp/apt-dpkg-install-rf5BLm/15-libldacbt-enc2_2.0.2.3.r4.gaf2dd23-5~ubuntu20.04_amd64.deb (--unpack): trying to overwrite '/usr/lib/x86_64-linux-gnu/libldacBT_enc.so.2.0.2.3', which is also in package libldac:amd64 2.0.2.3~r26478861 Preparing to unpack .../16-libldacbt-abr2_2.0.2.3.r4.gaf2dd23-5~ubuntu20.04_amd64.deb ... Unpacking libldacbt-abr2:amd64 (2.0.2.3.r4.gaf2dd23-5~ubuntu20.04) over (2.0.2.3+git20200429+ed310a0-5) ... dpkg: error processing archive /tmp/apt-dpkg-install-rf5BLm/16-libldacbt-abr2_2.0.2.3.r4.gaf2dd23-5~ubuntu20.04_amd64.deb (--unpack): trying to overwrite '/usr/lib/x86_64-linux-gnu/libldacBT_abr.so.2.0.2.3', which is also in package libldac:amd64 2.0.2.3~r26478861
How to resolve the “trying to overwrite” Issue?
There are multiple solutions below based on when the error occurred. If you got the issue while running an apt command, then check the apt section. If it happened while running a dpkg command, then check the dpkg section.
With DPKG
If the error occurred while you were executing the apt command, then use the command as follows.
sudo dpkg -i --force-overwrite theDebYouWantToInstall.deb sudo apt-get --fix-broken install
This command will install the deb file with file overwriting when needed.
With APT
If the error occurred while you were executing the dpkg command, then use the command as follows.
sudo apt-get -o Dpkg::Options::="--force-overwrite" [YourAptActionCommand] #An Example sudo apt-get -o Dpkg::Options::="--force-overwrite" dist-upgrade #Another Example sudo apt-get -o Dpkg::Options::="--force-overwrite" apt-get install nmap
This command will install the deb file with file overwriting when needed.
[…] Источник […]
[…] Источник […]
[…] Источник […]
[…] Источник […]
[…] Источник […]
… [Trackback]
[…] Find More here on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More Information here on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Information on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Find More Information here on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] There you will find 43963 additional Info on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More Information here to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More Information here to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Find More Information here on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] There you can find 44563 additional Info to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Information on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Here you will find 32553 additional Info to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] There you will find 17936 additional Information on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More Information here on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Find More to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] There you can find 23466 more Information to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Here you will find 84474 more Information to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Here you can find 1344 additional Information to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More Information here on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Find More here to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More on on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] There you will find 32588 additional Info to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Info on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] There you can find 99701 more Info to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Here you can find 63881 more Info to that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Info on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] There you will find 56300 additional Information on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]
… [Trackback]
[…] Read More Info here on that Topic: genuinecoder.com/how-to-fix-trying-to-overwrite-which-is-also-in-package-issue-in-linux/ […]