[Ubuntu 16.04]
我的机器上没有mysql
运行,我不想要它。
我确实需要安装redis-server
. 所以我这样做了:
$ sudo apt-get install redis-server
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
所以我继续...
$ sudo dpkg --configure -a
Setting up linux-aws-headers-4.4.0-1055 (4.4.0-1055.64) ...
Setting up linux-image-4.4.0-1055-aws (4.4.0-1055.64) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-1055-aws /boot/vmlinuz-4.4.0-1055-aws
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-1055-aws /boot/vmlinuz-4.4.0-1055-aws
update-initramfs: Generating /boot/initrd.img-4.4.0-1055-aws
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-1055-aws /boot/vmlinuz-4.4.0-1055-aws
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-1055-aws /boot/vmlinuz-4.4.0-1055-aws
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-1055-aws /boot/vmlinuz-4.4.0-1055-aws
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-1055-aws
Found initrd image: /boot/initrd.img-4.4.0-1055-aws
Found linux image: /boot/vmlinuz-4.4.0-1054-aws
Found initrd image: /boot/initrd.img-4.4.0-1054-aws
Found linux image: /boot/vmlinuz-4.4.0-1052-aws
Found initrd image: /boot/initrd.img-4.4.0-1052-aws
Found linux image: /boot/vmlinuz-4.4.0-1049-aws
Found initrd image: /boot/initrd.img-4.4.0-1049-aws
Found linux image: /boot/vmlinuz-4.4.0-1048-aws
Found initrd image: /boot/initrd.img-4.4.0-1048-aws
Found linux image: /boot/vmlinuz-4.4.0-1047-aws
Found initrd image: /boot/initrd.img-4.4.0-1047-aws
Found linux image: /boot/vmlinuz-4.4.0-1044-aws
Found initrd image: /boot/initrd.img-4.4.0-1044-aws
Found linux image: /boot/vmlinuz-4.4.0-1043-aws
Found initrd image: /boot/initrd.img-4.4.0-1043-aws
Found linux image: /boot/vmlinuz-4.4.0-1041-aws
Found initrd image: /boot/initrd.img-4.4.0-1041-aws
Found linux image: /boot/vmlinuz-4.4.0-1039-aws
Found initrd image: /boot/initrd.img-4.4.0-1039-aws
Found linux image: /boot/vmlinuz-4.4.0-1038-aws
Found initrd image: /boot/initrd.img-4.4.0-1038-aws
Found linux image: /boot/vmlinuz-4.4.0-1035-aws
Found initrd image: /boot/initrd.img-4.4.0-1035-aws
Found linux image: /boot/vmlinuz-4.4.0-1022-aws
Found initrd image: /boot/initrd.img-4.4.0-1022-aws
done
Setting up linux-headers-4.4.0-1055-aws (4.4.0-1055.64) ...
Setting up linux-image-aws (4.4.0.1055.57) ...
Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
它就在此时停止了。必须CTRL-C退出它......
我又试了...
$ sudo apt-get install redis-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-aws-headers-4.4.0-1022 linux-aws-headers-4.4.0-1035 linux-aws-headers-4.4.0-1038 linux-aws-headers-4.4.0-1039 linux-aws-headers-4.4.0-1041 linux-aws-headers-4.4.0-1043
linux-aws-headers-4.4.0-1044 linux-aws-headers-4.4.0-1047 linux-aws-headers-4.4.0-1048 linux-aws-headers-4.4.0-1049 linux-aws-headers-4.4.0-1052 linux-headers-4.4.0-1022-aws
linux-headers-4.4.0-1035-aws linux-headers-4.4.0-1038-aws linux-headers-4.4.0-1039-aws linux-headers-4.4.0-1041-aws linux-headers-4.4.0-1043-aws linux-headers-4.4.0-1044-aws
linux-headers-4.4.0-1047-aws linux-headers-4.4.0-1048-aws linux-headers-4.4.0-1049-aws linux-headers-4.4.0-1052-aws linux-image-4.4.0-1022-aws linux-image-4.4.0-1035-aws
linux-image-4.4.0-1038-aws linux-image-4.4.0-1039-aws linux-image-4.4.0-1041-aws linux-image-4.4.0-1043-aws linux-image-4.4.0-1044-aws linux-image-4.4.0-1047-aws
linux-image-4.4.0-1048-aws linux-image-4.4.0-1049-aws linux-image-4.4.0-1052-aws newrelic-daemon newrelic-php5-common
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
redis-server
0 upgraded, 1 newly installed, 0 to remove and 113 not upgraded.
2 not fully installed or removed.
Need to get 343 kB of archives.
After this operation, 918 kB of additional disk space will be used.
Get:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu xenial/universe amd64 redis-server amd64 2:3.0.6-1 [343 kB]
Fetched 343 kB in 0s (1,595 kB/s)
Selecting previously unselected package redis-server.
(Reading database ... 357711 files and directories currently installed.)
Preparing to unpack .../redis-server_2%3a3.0.6-1_amd64.deb ...
Unpacking redis-server (2:3.0.6-1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up mysql-server-5.7 (5.7.22-0ubuntu0.16.04.1) ...
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
从那一刻起,它就冻结了,永远不会结束。它就在此时停止了。必须CTRL-C退出它......
我该如何解开这个烂摊子?
当你这样做时
sudo apt-get install redis-server
,apt-get
就是在告诉你这意味着有包处于“损坏”状态,既没有安装也没有删除。
mysql-server-5.7
就是其中之一,这就是它不断“弹出”的原因。如果你坚持Ctrl+ Cout of it,这些错误就不会消失。
最简单的事情就是摆脱它:
万一
apt-get
抱怨,就让它dpkg --configure -a
做它的事(不要按Ctrl+ C,让它完成!),然后mysql-server-5.7
用上面的命令删除。