I am to install debian on my PC by 'from other linux' method and I run into problem with debootsrapt not being able to go through our proxy. As I understand the debootstrap doesnt have config file neither takes arguments on command line (relating to proxy), so I set following two environment variables:
ftp_proxy=http://myname:[email protected]:4128
http_proxy=http://myname:[email protected]:4128
Still I am getting:
# /usr/sbin/debootstrap --arch i386 wheezy /mnt/debinst http://ftp.cz.debian.org/debian
I: Retrieving Release
E: Failed getting release file http://ftp.cz.debian.org/debian/dists/wheezy/Release
the Release file can be get via browser, so it exists and so on...
I wonder if this can be done at all
Thanks
Well, I am to answer my question by myself.
With strace I found that debootstrap calls wget to fetch files from repositories. Obviously environment variables were somehow ignored but I edited /etc/wgetrc and put there all proxy related settings.
So it works.
BTW: debootstrap itself is just a script so maybe other workarounds would be possible.
You need to export the environment variables after setting them.
# ftp_proxy=http://myname:[email protected]:4128
# http_proxy=http://myname:[email protected]:4128
# export ftp_proxy http_proxy
# /usr/sbin/debootstrap --arch i386 wheezy /mnt/debinst http://ftp.cz.debian.org/debian
Also, if you try to set them from a user shell and then use sudo to run debootstrap, those variables may not pass through so it's better to set them after getting to a root shell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With