KDE环境下无法安装mysql-community-server吗?
升级mysql-community-server时,
Preparing to unpack .../mysql-community-server_5.6.29-1debian8_amd64.deb ...
................
dpkg: error processing archive /home/yi01/Downloads/mysql-community-server_5.6.29-1debian8_amd64.deb (--install):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
因为一个类似的错误而失败了。
将mysql-community-server的deb文件解压
sudo dpkg-deb -x ~/Downloads/mysql-community-server_5.6.29-1debian8_amd64.deb ~/Downloads/hoge
sudo dpkg-deb -e ~/Downloads/mysql-community-server_5.6.29-1debian8_amd64.deb ~/Downloads/hoge/DEBIAN
重建
#!/bin/bash -x
再次巩固 cì
sudo dpkg-deb -b ~/Downloads/hoge ~/Downloads/mysql-oreore-server.deb
当尝试进行mysql-oreore-server安装时,
+ echo upgrade
+ case "$1" in
+ set -e
+ server_stop
++ get_pcount
+++ ps -ef
+++ grep /usr/sbin/mysqld
+++ wc -l
++ PSCOUNT=2
++ echo 2
+ PSCOUNT=2
+ COUNT=0
+ :
+ COUNT=1
+ echo -n .
.+ '[' 2 -eq 1 ']'
+ '[' 1 -gt 15 ']'
++ get_pcount
+++ ps -ef
+++ grep /usr/sbin/mysqld
+++ wc -l
++ PSCOUNT=2
++ echo 2
+ PSCOUNT=2
+ sleep 1
+ :
+ COUNT=2
+ echo -n .
.+ '[' 2 -eq 1 ']'
+ '[' 2 -gt 15 ']'
++ get_pcount
+++ ps -ef
+++ wc -l
+++ grep /usr/sbin/mysqld
++ PSCOUNT=2
++ echo 2
+ PSCOUNT=2
+ sleep 1
+ :
+ COUNT=3
+ echo -n .
.+ '[' 2 -eq 1 ']'
+ '[' 3 -gt 15 ']'
++ get_pcount
+++ ps -ef
:
:
:
就像这样,一直数到15然后就挂了。
如果数mysqld的数量如果是1的话就可以,但是如果是2的话似乎就有问题了。
yi01 26505 0.0 0.7 2347772 119700 ? Sl Mar02 0:38 /usr/sbin/mysqld --defaults-file=/home/yi01/.local/share/akonadi/mysql.conf --datadir=/home/yi01/.local/share/akonadi/db_data/ --socket=/tmp/akonadi-yi01.fUJrZG/mysql.socket
yi01 27063 0.0 0.0 12732 2172 pts/6 S+ 11:02 0:00 grep mysqld
Akonadi?仿佛是自动运行MySQL服务器,这是mysql-community-server方面意料之外的。
也许只需要关闭KDM,在纯黑屏幕上登录并执行sudo apt-get install mysql-community-server就能解决问题。一边思考,一边拆解并重新组装DEB包,我已经完成了这个操作。
server_stop () {
PSCOUNT=$(get_pcount)
COUNT=0
while :; do
COUNT=$(( COUNT+1 ))
echo -n .
if [ "${PSCOUNT}" -eq 2 ]; #★1を2に書き換えた★
then
当我再次构建并安装了mysql-oreore-server软件包后,问题得到解决。
尽管如此,我不能每次都做这样的事情。
安装或升级MySQL时,请关闭KDM并从控制台登录来执行!
所以,就这样。