2

Similar to this question, I added some deb files and followed the latest answer by @Wowfunhappy in this question to create my own local repo. However during apt-get update I get the following errors:

Could not open file /var/lib/apt/lists/partial/_usr_local_mydebs_._Packages - open (13: Permission denied)
Hit:7 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Reading package lists... Done                      
N: Download is performed unsandboxed as root as file '/usr/local/mydebs/./InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
E: Failed to fetch store:/var/lib/apt/lists/partial/_usr_local_mydebs_._Packages  Could not open file /var/lib/apt/lists/partial/_usr_local_mydebs_._Packages - open (13: Permission denied)
E: Some index files failed to download. They have been ignored, or old ones used instead.

EDIT: I am using a docker container (Ubuntu 18.04).

EDIT2

I have found a workaround from this question. However I still do get this message:

N: Download is performed unsandboxed as root as file '/usr/local/mydebs/./InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Is this a harmless bug since I can proceed on installing packages? I am not familiar what "N" means.

1 Answers1

2

Adding the line to apt-get update fixed it.

-o APT::Sandbox::User=root

complete apt-get update becomes:

apt-get -o Acquire::GzipIndexes=false -o APT::Sandbox::User=root update