I don't know why, but after installing some programs there's been a mistake in the terminal. So then every time when I update or trying to install a new package through terminal in the end a mistake appears:

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. 

But When I write apt-get update then it says this:

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?
  • Try sudo apt-get update. If the problem remains the same, post your /etc/apt/sources.lst here. – Jos May 9 '14 at 10:26
  • Now it says this ppa.launchpad.net trusty/main i386 Packages 404 Not Found An in the end there is a note, that "Some indexed files didn't download. They were ignored or instead of them old versions were used" – Henry Wayat May 9 '14 at 10:35

Try to run sudo apt-get update, (you'll need to type in your password) normally when you see the "access denied" you just need to make sure you run the command as super user so it has the proper rights.

  • Did it, the new mistake appears ppa.launchpad.net trusty/main i386 Packages 404 Not Found – Henry Wayat May 9 '14 at 10:39
  • In the long run, that error won't cause you any real problems. It just means that you have a broken source. If you want, you can remove that PPA with the Software and Updates settings in your settings application. – Dillmo May 9 '14 at 10:56
  • Could be that the mistake with duplicate sources may be because somehow I have TWO the same identical sources? – Henry Wayat May 9 '14 at 17:46
up vote 0 down vote accepted

Deleted two same sources from Other Software and it worked.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.