After WLinux is installed it runs initial setup program. However when we are behind proxy, it fails to connect to the apt repository and also fails to get updated content.
Is there anyway for setup program to ask for proxy server name and port and use it.
Note
These WSL error messages occur from time to time and can tricky to troubleshoot short of reinstalling WSL.
They are usually not an issue with WLinux itself but a glitch with the underlying Windows Subsystem for Linux in Windows 10.
You can help us help you and Microsoft improve WSL and address these if you can provide us some debugging information.
[ ] I have read the above statement.
Basic Troubleshooting
Please check:
[ ] I have confirmed WSL is enabled: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#confirm-wsl-is-enabled.
[ ] I have searched Google for the error message.
[ ] I have searched the official Microsoft WSL issues page: https://github.com/Microsoft/WSL/issues.
[ ] I have searched the WLinux issues page: https://github.com/WhitewaterFoundry/WLinux/issues.
[ ] I have reset WLinux: Settings->Apps->Apps & features->WLinux->Advanced Options->Reset.
[ ] I have disabled and re-enabled WSL in Windows Features.
[ ] I have run Windows 10 updates and restarted.
What other troubleshooting have you attempted to date?
Error Code
Insert here:
Please check:
[ ] This error code is not one listed below.
Known Error Codes
0x80040306 Fix: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80040306-on-installation
0x80040154 Fix: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#error-0x80040154-after-windows-update
Version
Find: Settings->Apps->Apps & features->WLinux->Advanced Options->Version.
Insert here:
Screenshot
Insert here:
Windows Build
Run 'systeminfo | findstr /C:"OS"' in Command Prompt and insert here:
For help on retrieving: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#check-your-build-number
WSL Debug Data
Please collect and attach .etl files by following this guide: https://docs.microsoft.com/en-us/windows/wsl/troubleshooting#starting-bash-gives-an-error-code
You would set up a proxy manually in apt the same way you would on bare metal, see:
https://help.ubuntu.com/community/AptGet/Howto#Setting_up_apt-get_to_use_a_http-proxy
It seems that apt does not honor http proxy variables. It needs to be setup
in proxy.conf. Please see ths link:
https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-the-proxy-for-apt-for-ubuntu-18-04/
Sent from my iPad Air
On Oct 1, 2018, at 2:50 PM, Hayden notifications@github.com wrote:
You would set up a proxy manually in apt the same way you would on bare
metal, see:
https://help.ubuntu.com/community/AptGet/Howto#Setting_up_apt-get_to_use_a_http-proxy
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/WhitewaterFoundry/WLinux/issues/81#issuecomment-426020613,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APzJtWVbC1GrGlfOJRxL1_4E7hyQEoJuks5ugmQHgaJpZM4XCg9F
.
apt is no longer supporting http_proxy variables. Please see below for setting up proxy.conf file.
After following this it resolved my issue.
@ket000 I have solved (for Ubuntu wsl distro) creating /etc/apt/apt.conf.d/proxy.conf and writing inside it something like
Acquire::http::Proxy "http://proxy.myserver.com:8080";
Gotcha, @ket000, sorry for confusion.
Thank you @aborruso.
You could open /etc/apt/apt.conf.d/proxy.conf in nano (my favorite) or something like $ sudo echo 'Acquire::http::Proxy "http://proxy.myserver.com:8080";' >> /etc/apt/apt.conf.d/proxy.conf.
Most helpful comment
apt is no longer supporting http_proxy variables. Please see below for setting up proxy.conf file.
https://www.serverlab.ca/tutorials/linux/administration-linux/how-to-set-the-proxy-for-apt-for-ubuntu-18-04/
After following this it resolved my issue.