Ubuntu一直有的安装错误

2018-11-07  本文已影响0人  追风少年王二狗

安装新软件时候一直遇到这个问题:


You might want to run 'apt-get -f install' to correct these:

The following packages have unmet dependencies:

python-dev : Depends: libpython-dev (= 2.7.12-1~16.04) but it is not going to be installed

              Depends: python2.7-dev (>= 2.7.12-1~) but it is not going to be installed

ubuntu-core-launcher : Depends: snapd (= 2.34.2) but 2.34.2~14.04 is to be installed

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)

觉得应该是源的问题运行apt-get update命令,发现以下错误:


W: GPG error: https://download.sublimetext.com apt/stable/ InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F57D4F59BD3DF454

W: The repository 'https://download.sublimetext.com apt/stable/ InRelease' is not signed.

N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.

N: See apt-secure(8) manpage for repository creation and user configuration details.

这个说明是公钥缺失,安装公钥


sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F57D4F59BD3DF454

之后再次运行update命令,运行成功,但是再apt-get upgrade命令中出现新的错误:


ubuntu-core-launcher : Depends: snapd (= 2.34.2) but 2.34.2~14.04 is installed

E: Unmet dependencies. Try using -f.

按照bing得到的结果,移除Ubuntu-core-launcher,再次运行运行成功

之后使用apt-get安装软件的时候出现snapd的错误,snapd是一个包安装管理器,但是作为一个apt-get党,觉得这个删就删吧,运行命令:
apt-get remove snapd
发现不能删除,是因为var/lib/dpkg/info/snapd.prerm的存在,于是再其第二行加入exit 0骗过shell脚本,执行remove命令。
最后利用update和upgrade命令进行更新源,完成!!!

上一篇下一篇

猜你喜欢

热点阅读