简体   繁体   English

在 ubuntu 20.04 上安装 git 期间发生错误

[英]error occur during git installation on ubuntu 20.04

When I attempt to install git on Ubuntu 20.04,I get an error.当我尝试在 Ubuntu 20.04 上安装 git 时,出现错误。 I used the following command:我使用了以下命令:

sudo apt-get install git

and it generated an error:它产生了一个错误:

dpkg: warning: old mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
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-8.0_8.0.27-0ubuntu0.20.04.1_amd64.deb (--unpack):
 new mysql-server-8.0 package pre-removal 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:
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-8.0_8.0.27-0ubuntu0.20.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

As shown here , that means the config.dat file is used by another process, that you need to kill.如此处所示,这意味着 config.dat 文件被另一个进程使用,您需要将其杀死。

sudo fuser -v -k /var/cache/debconf/config.dat

That would kill directly said other process.那会直接杀死所说的其他进程。

Then you can try again your install command.然后你可以再试一次你的安装命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM