Linux中安装新的包时错误提示

错误1

E:Could not open lock file /var/lib/dpkg/lock - open (13:Permission denied)

E:Unable to lock the administration directory (/var/lib/dpkg/),are you root?

解决方案

sudo rm -rf /var/lib/dpkg/lock

sudo rm -rf /var/cache/apt/archives/lock

sudo apt-get update

最后运行:sudodpkg --configure -a 重新配置(系统会提醒)


你可能感兴趣的:(Linux中安装新的包时错误提示)