1

I'm trying to update Linux, I am running 18.04.4 LTS. It has been failing to update for a while now and it's the first moment I have had to look into it. This is the error I am getting

Err:1 http://apt.insync.io/ubuntu bionic/non-free amd64 insync amd64 3.2.6.40863-bionic
  403  Forbidden [IP: 52.216.102.123 80]
E: Failed to fetch http://apt.insync.io/ubuntu/pool/non-free/i/insync/insync_3.2.6.40863-bionic_amd64.deb  403  Forbidden [IP: 52.216.102.123 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

There was some software that I was using call insync that synced computers between two remote locations. That software is no longer being used or installed.

I have tried with the recommended run apt-get update. I then get these messages.

E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)

Any ideas?

cocomac
  • 3,394
stee1e
  • 13
  • 1
  • 3
  • 1
    If you're running 18.04.4; you're more than a year behind on security fixes & upgrades (https://fridge.ubuntu.com/2020/08/14/ubuntu-18-04-5-lts-released/ shows the date for 18.04.5 ISO release, but installed systems upgraded before that date, and updated systems show 18.04.6 currently). Remove the source you don't have access to (it's no use to you if you don't have access to it), for issues with that source I'd recommend asking the owner. – guiverc Nov 07 '21 at 20:46
  • Does this answer your question? What does "sudo apt-get update" do? . So run sudo apt-get update followed by sudo apt-get upgrade then install Insync. It still provides packages for 18.04 LTS. – N0rbert Nov 07 '21 at 20:56

2 Answers2

0

You need to run it with sudo. For example, apt update should be sudo apt update.

If you just want to do standard normal updates (e.g., if you want to update the packages, and not just the package list), the proper command is sudo apt update && sudo apt upgrade. The sudo tells Ubuntu to run the command as the superuser, which is the Linux equivalent of an administrator. The superuser has permission to run that command, your user doesn't. Hence, why when you run it without sudo, it fails. Also, if you aren't using Insync anymore, you can remove the package repo by following the directions here.

cocomac
  • 3,394
  • Thanks, Once I got rid of all the packages it worked. i was using sudo the whole time. Not sure why I forgot to add that. Thanks for your help. – stee1e Nov 07 '21 at 21:03
  • @stee1e Glad I could help. If I solved your problem, please accept my answer (click the checkmark). This tells the community what solved your issue. – cocomac Nov 07 '21 at 21:06
0

You can also try something like this...

$ sudo -i
$ apt update

Enter above these two commands in your terminal something like this...