MySQL 搞乱了 apt-get?

MySQL 搞乱了 apt-get?

我尝试在本地主机上安装 MySQL,但破坏了依赖关系,因此无法不是安装任何东西

我努力了:

  • 清除 MySQL 公共资源、客户端、服务器等。
  • 删除 MySQL 公共部分、客户端、服务器等等。
  • apt-get 更新
  • apt-get 清理
  • 自动清理
  • apt-get -f 安装

当我执行 apt-get -f install 时,我得到了这个:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libmysqlclient18
The following NEW packages will be installed:
  libmysqlclient18
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
4 not fully installed or removed.
Need to get 0 B/603 kB of archives.
After this operation, 3,503 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 364284 files and directories currently installed.)
Preparing to unpack .../libmysqlclient18_5.5.40-0ubuntu1_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.5.40-0ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/libmysqlclient18_5.5.40-                                                     
0ubuntu1_amd64.deb (--unpack):
 trying to overwrite shared '/usr/share/doc/libmysqlclient18/changelog.Debian.gz',                  
which is different from other instances of package libmysqlclient18:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libmysqlclient18_5.5.40-0ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) 

如果您需要更多信息,请告诉我该怎么做

谢谢!

答案1

您可以使用以下命令完全覆盖该包。

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libmysqlclient18_5.5.40-0ubuntu1_amd64.deb

然后尝试apt-get -f install

相关内容