7

If I run debootstrap in with sudo I get the following output:

I: Retrieving InRelease 
I: Failed to retrieve InRelease
I: Retrieving Release 
E: Failed getting release file http://de.archive.ubuntu.com/ubuntu/dists/xenial/Release

If I run the command directly as root, all seems well and the chroot will be built perfectly.

On my local machine I'm also able to build the chroot with sudo. The difference is the configured proxy. I guess that debootstrap doesn't use the proxy if I run it with sudo?

8

sudo sets up only a limited environment and you might for instance miss the http_proxy env variable that gets initiated by your login shell.
You might try to run sudo with the -i option as that will simulate a login session which might load a more complete environment that includes proxy settings or modify /etc/sudoers to stop suppressing the proxy environment vars with :

 #/etc/sudoers
 Defaults env_keep += "http_proxy https_proxy ftp_proxy"  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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