On running apt upgrade or apt dist-upgrade, terminal is showing a error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libpython3-stdlib mysql-common python3
Suggested packages:
  python3-doc python3-tk python3-venv
The following packages will be upgraded:
  libpython3-stdlib mysql-common python3
3 upgraded, 0 newly installed, 0 to remove and 267 not upgraded.
68 not fully installed or removed.
Need to get 0 B/740 kB of archives.
After this operation, 2,303 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Reading changelogs... Done
(Reading database ... 331398 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.6.29-1debian7_amd64.deb ...
Unpacking mysql-common (5.6.29-1debian7) over (5.6.28-1) ...
dpkg: error processing archive /var/cache/apt/archives/mysqlcommon_5.6.29-1debian7_amd64.deb (--unpack):
 trying to overwrite '/usr/share/mysql/charsets/cp1251.xml', which is also in package mysql-server-core-5.6 5.6.28-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:

I tried running apt install -f and apt purge mysql-common, but that didn't work. What to do?

On running apt update:

Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable Release
Hit:4 http://repo.mysql.com/apt/debian wheezy InRelease      
Get:5 http://archive-3.kali.org/kali kali-rolling InRelease [24.6 kB]
Get:6 http://archive-3.kali.org/kali kali-rolling/main amd64 Packages [13.6 MB]
Get:7 http://archive-3.kali.org/kali kali-rolling/non-free amd64 Packages [143 kB]
Fetched 13.8 MB in 6min 16s (36.5 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
287 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1)
W: http://repo.mysql.com/apt/debian/dists/wheezy/InRelease: Signature by key A4A9406876FCBD3C456770C88C718D3B5072E1F5 uses weak digest algorithm (SHA1)

On running apt-cache policy mysql-common mysql-server-core-5.6:

  Installed: 5.6.28-1
  Candidate: 5.6.29-1debian7
  Version table:
     5.6.29-1debian7 500
        500 http://repo.mysql.com/apt/debian wheezy/mysql-5.6 amd64 Packages
 *** 5.6.28-1 500
        500 http://http.kali.org/kali kali-rolling/main amd64 Packages
        100 /var/lib/dpkg/status
  Installed: 5.6.28-1
  Candidate: 5.6.28-1
  Version table:
 *** 5.6.28-1 500
        500 http://http.kali.org/kali kali-rolling/main amd64 Packages
        100 /var/lib/dpkg/status
  • have you done your 'apt update'? – Rui F Ribeiro Apr 3 '16 at 12:02
  • 1
    The problem is clear. You have a file level conflict between mysql-common and mysql-server-core-5.6. What is your distribution? Please paste the output of apt-cache policy mysql-common mysql-server-core-5.6 into your question. – Faheem Mitha Apr 3 '16 at 13:21
  • Interesting comment, @FaheemMitha; mixup between Oracle´s deb MySQL packages and native ones? – Rui F Ribeiro Apr 3 '16 at 14:11
  • Please do tell us if you have repo.mysql.com apt repository in /etc/apt/sources.list.d or /etc/apt/sources.list – Rui F Ribeiro Apr 3 '16 at 14:21
  • @RuiFRibeiro Possibly, they certainly look like they are incompatible. And the version numbers are different. But without more information it's difficult to say anything. – Faheem Mitha Apr 3 '16 at 14:46

Your problem is clear. You are mixing two different and incompatible versions of MySQL 5.6.

One of those is the Kali Linux version. Your url says kali-rolling, so this may not be a release. The other appears to be an upstream version of MySQL (from mysql.com) intended for Debian Wheezy (6.x).

Note that as a Debian derivative, Kali includes the same packages as Debian does, but versions can vary and easily be incompatible. It does not appear that your version of Kali is intended to be compatible with Debian Wheezy. Therefore, it's not surprising that trying to install these two disparate versions simultaneously is causing problems.

I recommend removing the mysql.com url from your sources.list, and sticking with the packages your distribution has provided. You could also consult your distribution's documentation to determine what versions of Debian (if any) are compatible with the version of Kali you are running.

Finally, note that HTML tags are not necessarily for formatting Markdown. To format code, or code-like output, simply select the text, and press the code button (two curly brackets). Or you can do it manually by moving all your text 4 spaces to the right.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.