使用MariaDB 10.0.6在内核3.12.5上运行Debian Wheezy . 执行了apt-get更新和apt-get升级,并遇到了一个问题:
root@zeus:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
curl gnupg gpgv libcurl3 libcurl3-gnutls libmariadbclient18 libmysqlclient18 libpixman-1-0 mariadb-client-10.0 mariadb-client-core-10.0 mariadb-common
mariadb-server mariadb-server-10.0 mariadb-server-core-10.0 megactl megaraid-status mysql-common virtualbox-4.3
18 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 110 MB of archives.
After this operation, 3,697 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://download.virtualbox.org/virtualbox/debian/ wheezy/contrib virtualbox-4.3 amd64 4.3.6-91406~Debian~wheezy [69.7 MB]
Get:2 http://security.debian.org/ wheezy/updates/main curl amd64 7.26.0-1+wheezy7 [269 kB]
Get:3 http://mirror.jmu.edu/pub/mariadb/repo/10.0/debian/ wheezy/main mariadb-server all 10.0.7+maria-1~wheezy [3,002 B]
Get:4 http://mirror.jmu.edu/pub/mariadb/repo/10.0/debian/ wheezy/main mysql-common all 10.0.7+maria-1~wheezy [8,844 B]
Get:5 http://hwraid.le-vert.net/debian/ wheezy/main megactl amd64 0.4.1+svn20090725.r6-2 [60.8 kB]
Get:6 http://mirror.jmu.edu/pub/mariadb/repo/10.0/debian/ wheezy/main mariadb-common all 10.0.7+maria-1~wheezy [3,306 B]
Get:7 http://mirror.jmu.edu/pub/mariadb/repo/10.0/debian/ wheezy/main libmariadbclient18 amd64 10.0.7+maria-1~wheezy [941 kB]
Get:8 http://security.debian.org/ wheezy/updates/main libcurl3 amd64 7.26.0-1+wheezy7 [330 kB]
Get:9 http://security.debian.org/ wheezy/updates/main libcurl3-gnutls amd64 7.26.0-1+wheezy7 [321 kB]
Get:10 http://hwraid.le-vert.net/debian/ wheezy/main megaraid-status all 0.11 [7,626 B]
Get:11 http://security.debian.org/ wheezy/updates/main libpixman-1-0 amd64 0.26.0-4+deb7u1 [427 kB]
Get:12 http://mirror.jmu.edu/pub/mariadb/repo/10.0/debian/ wheezy/main libmysqlclient18 amd64 10.0.7+maria-1~wheezy [2,964 B]
Get:13 http://mirror.jmu.edu/pub/mariadb/repo/10.0/debian/ wheezy/main mariadb-client-core-10.0 amd64 10.0.7+maria-1~wheezy [1,993 kB]
Get:14 http://security.debian.org/ wheezy/updates/main gpgv amd64 1.4.12-7+deb7u3 [227 kB]
Get:15 http://security.debian.org/ wheezy/updates/main gnupg amd64 1.4.12-7+deb7u3 [1,953 kB]
Get:16 http://mirror.jmu.edu/pub/mariadb/repo/10.0/debian/ wheezy/main mariadb-client-10.0 amd64 10.0.7+maria-1~wheezy [5,592 kB]
Get:17 http://mirror.jmu.edu/pub/mariadb/repo/10.0/debian/ wheezy/main mariadb-server-core-10.0 amd64 10.0.7+maria-1~wheezy [6,077 kB]
Get:18 http://mirror.jmu.edu/pub/mariadb/repo/10.0/debian/ wheezy/main mariadb-server-10.0 amd64 10.0.7+maria-1~wheezy [22.3 MB]
Fetched 110 MB in 26s (4,087 kB/s)
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 86984 files and directories currently installed.)
Preparing to replace curl 7.26.0-1+wheezy6 (using .../curl_7.26.0-1+wheezy7_amd64.deb) ...
Unpacking replacement curl ...
Preparing to replace libcurl3:amd64 7.26.0-1+wheezy6 (using .../libcurl3_7.26.0-1+wheezy7_amd64.deb) ...
Unpacking replacement libcurl3:amd64 ...
Preparing to replace libcurl3-gnutls:amd64 7.26.0-1+wheezy6 (using .../libcurl3-gnutls_7.26.0-1+wheezy7_amd64.deb) ...
Unpacking replacement libcurl3-gnutls:amd64 ...
Preparing to replace libpixman-1-0:amd64 0.26.0-4 (using .../libpixman-1-0_0.26.0-4+deb7u1_amd64.deb) ...
Unpacking replacement libpixman-1-0:amd64 ...
Preparing to replace mariadb-server 10.0.6+maria-1~wheezy (using .../mariadb-server_10.0.7+maria-1~wheezy_all.deb) ...
Unpacking replacement mariadb-server ...
Preparing to replace mysql-common 10.0.6+maria-1~wheezy (using .../mysql-common_10.0.7+maria-1~wheezy_all.deb) ...
Unpacking replacement mysql-common ...
Preparing to replace mariadb-common 10.0.6+maria-1~wheezy (using .../mariadb-common_10.0.7+maria-1~wheezy_all.deb) ...
Unpacking replacement mariadb-common ...
Preparing to replace libmariadbclient18 10.0.6+maria-1~wheezy (using .../libmariadbclient18_10.0.7+maria-1~wheezy_amd64.deb) ...
Unpacking replacement libmariadbclient18 ...
Preparing to replace libmysqlclient18 10.0.6+maria-1~wheezy (using .../libmysqlclient18_10.0.7+maria-1~wheezy_amd64.deb) ...
Unpacking replacement libmysqlclient18 ...
Preparing to replace mariadb-client-core-10.0 10.0.6+maria-1~wheezy (using .../mariadb-client-core-10.0_10.0.7+maria-1~wheezy_amd64.deb) ...
Unpacking replacement mariadb-client-core-10.0 ...
Preparing to replace mariadb-client-10.0 10.0.6+maria-1~wheezy (using .../mariadb-client-10.0_10.0.7+maria-1~wheezy_amd64.deb) ...
Unpacking replacement mariadb-client-10.0 ...
Preparing to replace mariadb-server-core-10.0 10.0.6+maria-1~wheezy (using .../mariadb-server-core-10.0_10.0.7+maria-1~wheezy_amd64.deb) ...
Unpacking replacement mariadb-server-core-10.0 ...
Processing triggers for man-db ...
Setting up mysql-common (10.0.7+maria-1~wheezy) ...
Setting up mariadb-common (10.0.7+maria-1~wheezy) ...
(Reading database ... 86984 files and directories currently installed.)
Preparing to replace mariadb-server-10.0 10.0.6+maria-1~wheezy (using .../mariadb-server-10.0_10.0.7+maria-1~wheezy_amd64.deb) ...
[ ok ] Stopping MariaDB database server: mysqld.
[ ok ] Stopping MariaDB database server: mysqld.
Unpacking replacement mariadb-server-10.0 ...
Preparing to replace virtualbox-4.3 4.3.4-91027~Debian~wheezy (using .../virtualbox-4.3_4.3.6-91406~Debian~wheezy_amd64.deb) ...
Stopping VirtualBox web service ...done.
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Stopping VirtualBox kernel modules ...done.
dpkg: ... it looks like that went OK
Unpacking replacement virtualbox-4.3 ...
Preparing to replace gpgv 1.4.12-7+deb7u2 (using .../gpgv_1.4.12-7+deb7u3_amd64.deb) ...
Unpacking replacement gpgv ...
Processing triggers for man-db ...
Processing triggers for shared-mime-info ...
Processing triggers for hicolor-icon-theme ...
Setting up gpgv (1.4.12-7+deb7u3) ...
(Reading database ... 86987 files and directories currently installed.)
Preparing to replace gnupg 1.4.12-7+deb7u2 (using .../gnupg_1.4.12-7+deb7u3_amd64.deb) ...
Unpacking replacement gnupg ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Setting up gnupg (1.4.12-7+deb7u3) ...
(Reading database ... 86987 files and directories currently installed.)
Preparing to replace megactl 0.4.1+svn20090725.r6-1 (using .../megactl_0.4.1+svn20090725.r6-2_amd64.deb) ...
Unpacking replacement megactl ...
Preparing to replace megaraid-status 0.10 (using .../megaraid-status_0.11_all.deb) ...
[ ok ] Stopping megaraidsas-status monitor: megaraidsas-statusd.
Unpacking replacement megaraid-status ...
Processing triggers for man-db ...
Setting up libcurl3:amd64 (7.26.0-1+wheezy7) ...
Setting up curl (7.26.0-1+wheezy7) ...
Setting up libcurl3-gnutls:amd64 (7.26.0-1+wheezy7) ...
Setting up libpixman-1-0:amd64 (0.26.0-4+deb7u1) ...
Setting up virtualbox-4.3 (4.3.6-91406~Debian~wheezy) ...
Installing new version of config file /etc/init.d/vboxdrv ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modulesError! Could not locate dkms.conf file.
File: does not exist.
...done.
Removing old VirtualBox pci kernel module ...done.
Trying to register the VirtualBox kernel modules using DKMS ...done.
Starting VirtualBox kernel modules ...done.
Starting VirtualBox VMs configured for autostartls: cannot access /home/vbox/vboxdb/*.start: No such file or directory
Starting VirtualBox web service ...done.
Setting up megactl (0.4.1+svn20090725.r6-2) ...
Setting up megaraid-status (0.11) ...
[ ok ] Starting megaraidsas-status monitor: megaraidsas-statusd.
Setting up libmysqlclient18 (10.0.7+maria-1~wheezy) ...
Setting up libmariadbclient18 (10.0.7+maria-1~wheezy) ...
Setting up mariadb-client-core-10.0 (10.0.7+maria-1~wheezy) ...
Setting up mariadb-client-10.0 (10.0.7+maria-1~wheezy) ...
Setting up mariadb-server-core-10.0 (10.0.7+maria-1~wheezy) ...
Setting up mariadb-server-10.0 (10.0.7+maria-1~wheezy) ...
[ ok ] Stopping MariaDB database server: mysqld.
dpkg: error processing mariadb-server-10.0 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.0 (= 10.0.7+maria-1~wheezy); however:
Package mariadb-server-10.0 is not configured yet.
dpkg: error processing mariadb-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mariadb-server-10.0
mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
关键部分是:
Setting up libmysqlclient18 (10.0.7+maria-1~wheezy) ...
Setting up libmariadbclient18 (10.0.7+maria-1~wheezy) ...
Setting up mariadb-client-core-10.0 (10.0.7+maria-1~wheezy) ...
Setting up mariadb-client-10.0 (10.0.7+maria-1~wheezy) ...
Setting up mariadb-server-core-10.0 (10.0.7+maria-1~wheezy) ...
Setting up mariadb-server-10.0 (10.0.7+maria-1~wheezy) ...
[ ok ] Stopping MariaDB database server: mysqld.
dpkg: error processing mariadb-server-10.0 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.0 (= 10.0.7+maria-1~wheezy); however:
Package mariadb-server-10.0 is not configured yet.
dpkg: error processing mariadb-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mariadb-server-10.0
mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
所以我接着尝试了:
root@zeus:~# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... 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.
Setting up mariadb-server-10.0 (10.0.7+maria-1~wheezy) ...
[ ok ] Stopping MariaDB database server: mysqld.
dpkg: error processing mariadb-server-10.0 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.0 (= 10.0.7+maria-1~wheezy); however:
Package mariadb-server-10.0 is not configured yet.
dpkg: error processing mariadb-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mariadb-server-10.0
mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
然后试了一下
root@zeus:~# dpkg --configure -a
Setting up mariadb-server-10.0 (10.0.7+maria-1~wheezy) ...
[ ok ] Stopping MariaDB database server: mysqld.
dpkg: error processing mariadb-server-10.0 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.0 (= 10.0.7+maria-1~wheezy); however:
Package mariadb-server-10.0 is not configured yet.
dpkg: error processing mariadb-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mariadb-server-10.0
mariadb-server
我重新启动了服务,发现它会毫无错误地启动(令人惊讶) . 然后我还发现升级似乎已经发生了,因为我现在正在运行10.0.7:
root@zeus:~# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 38
Server version: 10.0.7-MariaDB-1~wheezy mariadb.org binary distribution
我正在寻找帮助解决apt错误而不会丢失我的配置或不得不删除任何东西,因为这台机器正在 生产环境 中 .
谢谢 .
3 回答
尝试从MariaDB 5.5.34升级到10.0.10时遇到了同样的问题 - 卸载和重新安装没有帮助 . 但跑步
apt-get purge mysql* mariadb*
做到了,它删除了所有使用mysql和mariadb上下文(和mysql目录)的软件包,似乎其中一个软件包以某种方式负责拙劣的安装尝试 .
之后我跑了
aptitude install mariadb-server
并且没有任何错误 .我有同样的问题 . 不幸的是,我真的只能将我的解决方案等同于“在尝试所有事情和任何事情之前猛烈尖叫直到它起作用” . 也就是说,也许我可以提供一些见解 .
这是我最近运行的命令,从我意识到它被破坏直到我修复它之后的一切:
那里有很多无用的和不必要的东西,但我不能100%确定解决方案是什么 . 也就是说,有两件事情突出:
sudo rm /var/lib/mysql/debian-*.flag
事实上我尝试安装普通的mysql(也失败了),然后在清除后再次尝试了mariadb .
这两件事都发生在上述历史摘录的末尾,而且我只是将整个日志包括在内,以防万一 .
10.0.13(2014年8月11日发布)出现相同的依赖性问题
尝试使用apt或aptitude干净地安装元数据包都会失败 . 所以尝试
apt-get install mariadb-server-10.0
删除版本标志也没有解决任何问题要修复它,我安装了10.1
(假设你已经在chroot中运行mariadb)
点
/etc/apt/sources.list
至/10.1/
随后试图降级到
10.0
不起作用 -10.1
运行没有问题 .