终端错误

终端错误

不知道为什么,安装完一些程序后,终端就出现了错误。所以每次我更新或者尝试通过终端安装新软件包时,最后都会出现错误:

W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ trusty/partner i386 Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_trusty_partner_binary-i386_Packages)
W: Duplicate sources.list entry http://repo.yandex.ru/yandex-disk/deb/ stable/main i386 Packages (/var/lib/apt/lists/repo.yandex.ru_yandex-disk_deb_dists_stable_main_binary-i386_Packages)
W: You can do «apt-get update» to correct a mistake. 

但当我写下它时apt-get update,它是这样说的:

E: Failed to open a blocked file /var/lib/apt/lists/lock - open (13: Access denied)
E: Impossible to block catalog /var/lib/apt/lists/
E: Failed to open a blocked file /var/lib/dpkg/lock - open (13:Access denied)
E: Failed to block the lead catalog (/var/lib/dpkg/); Do you have the rights of superuser?

答案1

尝试运行sudo apt-get update,(您需要输入密码)正常情况下,当您看到“拒绝访问”时,您只需要确保以超级用户身份运行该命令,这样它才具有适当的权限。

答案2

从其他软件中删除两个相同的源并且它起作用了。

相关内容