git - 在 ubuntu 20.04 上安装 git 时发生错误

标签 git ubuntu installation sudo apt

当我尝试在 Ubuntu 20.04 上安装 git 时,出现错误。我使用了以下命令:

sudo apt-get install git
它生成了 错误:
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 ,这意味着 config.dat 文件被另一个进程使用,你需要杀死它。

sudo fuser -v -k /var/cache/debconf/config.dat
那会直接杀死所说的其他进程。
然后你可以再试一次你的安装命令。

关于git - 在 ubuntu 20.04 上安装 git 时发生错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70445564/

相关文章:

git - 如何使用 SourceTree 将指定的提交 rebase 到不同的分支?

gitolite用户无法连接

android - 如何从 ubuntu 获取 android 电池电量?

python - 使用 pip 安装包时出现 ssl 错误

macos - "GNU Make not found. Try setting the environment variable GNUMAKE."

python - 使用 python 读取并更新 git 配置?

android - repo 和 jiri 的主要区别是什么?

amazon-web-services - 如何使用来自 ACM 的 AWS 证书使用 Amazon EC2 从端口 80 重定向到 443?

java - OS-X 和 IZPack : user friendly ways to run installer on OS-X computers with NO Java installed

android - 在 CentOS 中使用 ADB 在模拟器中安装 APK