Ubuntu

在 Ubuntu 19.4 中安裝 MySQL 時出現 apt 升級問題

  • May 12, 2019

我試圖mysqlubuntu19.4 中安裝,但我無法升級 sudo apt upgrade

這是輸出;

astrix@astrix:~/Downloads$ sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
 mysql-server-5.7
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 0 B/3,247 kB of archives.
After this operation, 48.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 219928 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.26-0ubuntu0.19.04.1_amd64.deb ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.26-0ubuntu0.19.04.1_amd64.deb (--unpack):
new mysql-server-5.7 package pre-installation script subprocess returned error exit status 1
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error while cleaning up:
new mysql-server-5.7 package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.7_5.7.26-0ubuntu0.19.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
astrix@astrix:~/Downloads$ 

@侯賽因,

你可以執行這個命令的最簡單的事情,

sudo rm /var/cache/debconf/*.dat

然後再次執行升級,請參閱此連結askubunu

但不要忘記先備份,以便以後恢復。

引用自:https://unix.stackexchange.com/questions/517304