apt-get upgrade 没有完全安装但是没问题,如何删除?

apt-get upgrade 没有完全安装但是没问题,如何删除?

我们将 mariadb 与 galera 结合使用。一切运行良好,但每次我们使用sudo apt-get upgrade它进行升级时,它都认为升级失败mariadb-server,但实际上它运行正常。我认为问题是由于重新启动服务器需要很长时间,因为它需要赶上停机期间从其他服务器错过的内容,因此升级脚本认为存在问题。

问题是,现在每当我调用sudo apt-get upgrade它时,它都会再次尝试(并失败)。我如何手动告诉它该包没有问题,然后让它不管它?谢谢。

Setting up mariadb-galera-server-5.5 (5.5.37+maria-1~saucy) ...
 * Stopping MariaDB database server mysqld                                                                                                                                                                              [ OK ]
 * Starting MariaDB database server mysqld                                                                                                                                                                              [fail]
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mariadb-galera-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-galera-server:
 mariadb-galera-server depends on mariadb-galera-server-5.5 (= 5.5.37+maria-1~saucy); however:
  Package mariadb-galera-server-5.5 is not configured yet.

dpkg: error processing package mariadb-galera-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                 Errors were encountered while processing:
 mariadb-galera-server-5.5
 mariadb-galera-server
E: Sub-process /usr/bin/dpkg returned an error code (1)


vioadmin@dachshund:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

答案1

只要拿着这两个包裹就可以mariadb-galera-server-5.5mariadb-galera-server

sudo apt-mark hold mariadb-galera-server-5.5
sudo apt-mark hold mariadb-galera-server

现在运行命令后不会设置 mariadb 服务器sudo apt-get upgrade

相关内容