使用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错误而不会丢失我的配置,或者因为这台机器正在生产中而不得不删除任何内容。
谢谢。
答案 0 :(得分:2)
尝试从MariaDB 5.5.34升级到10.0.10时遇到了同样的问题 - 卸载和重新安装没有帮助。但是运行
apt-get purge mysql* mariadb*
做到了,它删除了所有使用mysql和mariadb上下文(以及mysql目录)的软件包,看起来好像这些软件包中的一个以某种方式负责拙劣的安装尝试。
之后我运行了aptitude install mariadb-server
,它没有任何错误。
答案 1 :(得分:0)
我有同样的问题。不幸的是,我真的只能将我的解决方案等同于“在尝试所有事情和任何事情之前猛烈尖叫直到它起作用”。也就是说,也许我可以提供一些见解。
这是我最近运行的命令,这是从我意识到它被破坏直到我修复它的所有内容:
9952 sudo service mysql status
9953 sudo service mysql stoy
9954 sudo service mysql stop
9955 sudo apt-get update
9956 sudo apt-get upgrade
9957 dconf-editor
9958 dconf-editor --help
9959 dconf-editor
9960 sudo apt-get upgrade
9961 sudo apt-get install -f
9962 dpkg --configure -a
9963 sudo dpkg --configure -a
9964 sudo service mysql restart
9965 sudo apt-get purge 'mysql*' 'mariadb*'
9966 sudo apt-get install mariadb-server mariadb-server-10.0
9967 sudo apt-get purge 'mysql*' 'mariadb*'
9968 sudo apt-get install mariadb-server
9969 sudo apt-get install -f
9970 sudo dpkg --configure -a
9971 mysql
9972 sudo service mysql restart
9973 sudo service mysql start
9974 mysql
9975 l /var/run/mysqld
9976 sudo touch /var/run/mysqld/mysqld.sock
9977 l /var/run/mysqld
9978 sudo chown -R mysql /var/run/mysqld
9979 l /var/run/mysqld
9980 mysql
9981 sudo rm /var/run/mysqld/mysqld.sock
9982 mysql
9983 sudo dpkg --configure -a
9984 sudo apt-get install mariadb-server=10.0.6+maria-1~raring
9985 sudo apt-get install mariadb-server=10.0.6+maria
9986 sudo apt-get install mariadb-server=10.0.6
9987 sudo apt-get install mariadb-server=10.0.6+maria-1'raring
9988 sudo apt-get install mariadb-server=10.0.6+maria-1-raring
9989 sudo apt-get install mariadb-server=10.0.6+maria-1
9990 apt-cache madison mariadb-server
9991 sudo apt-get install devscripts
9992 rmadison
9993 rmadison mariadb-server
9994 rmadison sude
9995 rmadison sudo
9996 rmadison mariadb-server
9997 apt-show-versions
9998 _apt-show-versions
9999 _apt-show-versions -h
10000 sudo apt-get install apt-show-versions
10001 apt-show-versions sudo
10002 apt-show-versions mysql
10003 apt-show-versions mariadb-server
10004 apt-show-versions -p mariadb-server
10005 apt-show-versions -a mariadb-server
10006 sudo apt-get install mysql-server
10007 mysql
10008 sudo apt-get purge 'mysql*' 'mariadb*'
10009 sudo apt-get install mysql-server
10010 apt-show-versions mysql-server
10011 apt-show-versions -a mysql-server
10012 rmadison mysql-server
10013 sudo apt-get purge 'mysql*' 'mariadb*'
10014 sudo apt-get install mysql-server=5.5.32-0ubuntu7
10015 sudo apt-get install mysql-server=5.5.29-0ubuntu1
10016 sudo apt-get purge 'mysql*' 'mariadb*'
10017 rmadison mysql-server
10018 sudo apt-get install mysql-server
10019 sudo rm /var/lib/mysql/debian-*.flag
10020 find / -name '*.sock'
10021 sudo apt-get purge 'mysql*' 'mariadb*'
10022 sudo apt-get install mariadb-server
10023 mysql
那里有很多无用的和不必要的东西,但我不能100%确定解决方案是什么。也就是说,有两件事情可以解决:
sudo rm /var/lib/mysql/debian-*.flag
这些事情都发生在上述历史摘录的末尾附近,而且我只是将整个日志包含在其他内容中。
答案 2 :(得分:0)
10.0.13(2014年8月11日发布)出现了相同的依赖性问题
尝试使用apt或aptitude清理安装元数据包都会失败。尝试apt-get install mariadb-server-10.0
删除版本标志也不会修复任何内容
为了解决这个问题,我安装了10.1
(假设您已经在chroot中运行mariadb)
cp -rf /etc/mysql /etc/mysql.bak
apt-get remove --purge mariadb*
mv /etc/mysql.bak /etc/mysql
将/etc/apt/sources.list
指向/10.1/
apt-get update && apt-get install mariadb-server
随后尝试降级到10.0
无法正常运行 - 10.1
无问题地运行。