一 概述

在ubuntu系统中通过ifconfig查看ip的时候,提示

Command 'ifconfig' not found, but can be installed with:

sudo apt install net-tools

按照提示输入一下命令行

sudo apt install net-tools

结果就提示:Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend.

二 问题原因与解决方法

在安装软件包时如果出现Could not get lock /var/lib/dpkg/lock-frontend,说明之前使用apt时出现异常,没有正常关闭,还在运行,原因是我正在升级linux系统吗,后续继续研究,待续。

我们可以先查看apt的进程id,即pid

ps afx|grep apt

由于本人在更新系统,所以执行命令的时候提示:Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend.

当系统更新完后就可以正常安装了:

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐